From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E63DB13829C for ; Sun, 12 Jun 2016 01:19:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 544C4E09A2; Sun, 12 Jun 2016 01:19:30 +0000 (UTC) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5658FE0950 for ; Sun, 12 Jun 2016 01:19:29 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AB5A120445 for ; Sat, 11 Jun 2016 21:19:28 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Sat, 11 Jun 2016 21:19:28 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=M2nERnLkFBRfBaX ho9cwxKOEhZM=; b=s2h1VJ8StVufGHBX7ZPhDz6fE36CFSMNHgzNUxQw4wjNReI MHYlNrT8clplXbTMlaBFz8i/DzrqNUS9orRd+yZ3WvShDJzT/J5KyO20gEbp4gx3 mJKK+kIRnLRAS7sitD9NmZ7FjxYyEhJ2SH3VSsU57fE2T3JY9ozlv0WL3BBs= X-Sasl-enc: 1NtRFuN38RrU38tRIW3PmSj4NMNJYe+229dV4eVDIJ0m 1465694368 Received: from 127.0.0.1 (tor-exit.dhalgren.org [46.165.230.5]) by mail.messagingengine.com (Postfix) with ESMTPA id E0F9BF29F3 for ; Sat, 11 Jun 2016 21:19:27 -0400 (EDT) Subject: Re: [gentoo-dev] RFC: kernel-2.eclass Prefix support To: gentoo-dev@lists.gentoo.org References: <87k2hv22gz.fsf@gentoo.org> From: =?UTF-8?B?R8O2a3TDvHJrIFnDvGtzZWs=?= X-Enigmail-Draft-Status: N1010 Message-ID: <575CB89D.20206@gentoo.org> Date: Sat, 11 Jun 2016 21:19:25 -0400 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <87k2hv22gz.fsf@gentoo.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Archives-Salt: 38d9b776-b836-4b4e-a14d-005bf79e2ff6 X-Archives-Hash: 1db54d40441f8f6baad2c039dc16e52f Benda Xu: > Hi Fellows, > > This is a trivial patch for kernel-2.eclass to support Prefix. Does it > look good to be commited? > > Thanks, > Benda > > Bug: 478436 > --- kernel-2.eclass 2016-02-17 22:46:25.235543840 +0900 > +++ kernel-2.eclass 2016-05-24 01:14:22.246809021 +0900 > @@ -539,8 +522,8 @@ > #============================================================== > kernel_header_destdir() { > [[ ${CTARGET} == ${CHOST} ]] \ > - && echo /usr/include \ > - || echo /usr/${CTARGET}/usr/include > + && echo "${EPREFIX}"/usr/include \ > + || echo "${EPREFIX}"/usr/${CTARGET}/usr/include > } > > cross_pre_c_headers() { > @@ -667,7 +650,7 @@ > > # autoconf.h isnt generated unless it already exists. plus, we have > # no guarantee that any headers are installed on the system... > - [[ -f ${ROOT}/usr/include/linux/autoconf.h ]] \ > + [[ -f ${EROOT}/usr/include/linux/autoconf.h ]] \ EROOT already ends with a trailing slash. Also there are inconsistencies in the rest of the patch w.r.t. quoting EROOT and EPREFIX. > || touch include/linux/autoconf.h > > # if K_DEFCONFIG isn't set, force to "defconfig" > @@ -741,15 +724,15 @@ > # Do not use "linux/*" as that can cause problems with very long > # $S values where the cmdline to cp is too long > pushd "${S}" >/dev/null > - dodir ${ddir}/linux > + dodir ${ddir#${EPREFIX}}/linux > cp -pPR "${S}"/include/linux "${D}"/${ddir}/ || die > rm -rf "${D}"/${ddir}/linux/modules > > - dodir ${ddir}/asm > - cp -pPR "${S}"/include/asm/* "${D}"/${ddir}/asm > + dodir ${ddir#${EPREFIX}}/asm > + cp -pPR "${S}"/include/asm/* "${ED}"/${ddir}/asm > > if kernel_is 2 6 ; then > - dodir ${ddir}/asm-generic > + dodir ${ddir#${EPREFIX}}/asm-generic > cp -pPR "${S}"/include/asm-generic/* "${D}"/${ddir}/asm-generic > fi > > @@ -784,7 +767,7 @@ > > "${S}"/patches.txt > fi > > - mv ${WORKDIR}/linux* "${D}"/usr/src > + mv ${WORKDIR}/linux* "${ED}"/usr/src > > if [[ -n "${UNIPATCH_DOCS}" ]] ; then > for i in ${UNIPATCH_DOCS}; do > @@ -819,22 +799,22 @@ > > # if we are to forcably symlink, delete it if it already exists first. > if [[ ${K_SYMLINK} > 0 ]]; then > - [[ -h ${ROOT}usr/src/linux ]] && rm ${ROOT}usr/src/linux > + [[ -h ${EROOT}usr/src/linux ]] && rm ${EROOT}usr/src/linux > MAKELINK=1 > fi > > # if the link doesnt exist, lets create it > - [[ ! -h ${ROOT}usr/src/linux ]] && MAKELINK=1 > + [[ ! -h ${EROOT}usr/src/linux ]] && MAKELINK=1 > > if [[ ${MAKELINK} == 1 ]]; then > - cd "${ROOT}"usr/src > + cd "${EROOT}"usr/src > ln -sf linux-${KV_FULL} linux > cd ${OLDPWD} > fi > > # Don't forget to make directory for sysfs > - [[ ! -d ${ROOT}sys ]] && kernel_is 2 6 && mkdir ${ROOT}sys > + [[ ! -d ${EROOT}sys ]] && kernel_is 2 6 && mkdir ${EROOT}sys > > echo > elog "If you are upgrading from a previous kernel, you may be interested" > elog "in the following document:" > @@ -1353,11 +1310,11 @@ > [[ ${ETYPE} == headers ]] && return 0 > > # If there isn't anything left behind, then don't complain. > - [[ -e ${ROOT}usr/src/linux-${KV_FULL} ]] || return 0 > + [[ -e ${EROOT}usr/src/linux-${KV_FULL} ]] || return 0 > echo > ewarn "Note: Even though you have successfully unmerged " > ewarn "your kernel package, directories in kernel source location: " > - ewarn "${ROOT}usr/src/linux-${KV_FULL}" > + ewarn "${EROOT}usr/src/linux-${KV_FULL}" > ewarn "with modified files will remain behind. By design, package managers" > ewarn "will not remove these modified files and the directories they reside in." > echo >