From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
Date: Wed, 19 Feb 2014 17:47:48 +0000 (UTC) [thread overview]
Message-ID: <1392831715.84cc9e2cdcea063e2d6bd8bb8489df9f4a380353.dol-sen@gentoo> (raw)
commit: 84cc9e2cdcea063e2d6bd8bb8489df9f4a380353
Author: Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 5 10:40:03 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:41:55 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=84cc9e2c
Fix and improve kernel build when kerncache is enabled.
This patch gets rid of setting ROOT for merging kernel sources. Instead, the
sources are moved manually to the kerncache directory. A new file is created
containing the kernel version and it is fed into package.provided to prevent
merging the kernel sources again.
Brian Dolbec: fix whitespace error.
---
targets/support/kmerge.sh | 38 ++++++++++++++++++++++++++++++--------
1 file changed, 30 insertions(+), 8 deletions(-)
diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 7c7f8fe..5d1c674 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -197,8 +197,17 @@ then
# Create the kerncache directory if it doesn't exists
mkdir -p /tmp/kerncache/${clst_kname}
- clst_root_path=/tmp/kerncache/${clst_kname} PKGDIR=${PKGDIR} clst_myemergeopts="--quiet --nodeps --update --newuse" run_merge "${clst_ksource}" || exit 1
- KERNELVERSION=`portageq best_visible / "${clst_ksource}"`
+
+
+ if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.KERNELVERSION ]
+ then
+ KERNELVERSION=$(</tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.KERNELVERSION)
+ mkdir -p ${clst_port_conf}/profile
+ echo "${KERNELVERSION}" > ${clst_port_conf}/profile/package.provided
+ else
+ rm -f ${clst_port_conf}/profile/package.provided
+ fi
+
if [ ! -e ${clst_port_conf}/profile/package.provided ]
then
mkdir -p ${clst_port_conf}/profile
@@ -209,8 +218,26 @@ then
echo "${KERNELVERSION}" >> ${clst_port_conf}/profile/package.provided
fi
fi
+
[ -L /usr/src/linux ] && rm -f /usr/src/linux
- ln -s /tmp/kerncache/${clst_kname}/usr/src/linux /usr/src/linux
+
+ PKGDIR=${PKGDIR} clst_myemergeopts="--quiet --nodeps --update --newuse" run_merge "${clst_ksource}" || exit 1
+
+ SOURCESDIR="/tmp/kerncache/${clst_kname}/sources"
+ if [ -L /usr/src/linux ]
+ then
+
+ # A kernel was merged, move it to $SOURCESDIR
+ [ -e ${SOURCESDIR} ] && rm -Rf ${SOURCESDIR}
+
+ KERNELVERSION=`portageq best_visible / "${clst_ksource}"`
+ echo "${KERNELVERSION}" > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.KERNELVERSION
+
+ echo "Moving kernel sources to ${SOURCESDIR} ..."
+ mv `readlink -f /usr/src/linux` ${SOURCESDIR}
+
+ fi
+ ln -sf ${SOURCESDIR} /usr/src/linux
# If catalyst has set to a empty string, extraversion wasn't specified so we
# skip this part
@@ -259,9 +286,4 @@ unset USE
if [ -n "${clst_KERNCACHE}" ]
then
echo ${clst_kernel_use} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE
-
- if [ -e ${clst_port_conf}/profile/package.provided ]
- then
- sed -i "/^$(echo "${KERNELVERSION}" | sed -e 's|/|\\/|g')\$/d" ${clst_port_conf}/profile/package.provided
- fi
fi
next reply other threads:[~2014-02-19 17:47 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 17:47 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-11-28 11:41 [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/ Raúl Porcel
2014-10-26 12:27 Raúl Porcel
2014-04-20 13:41 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-03-03 16:07 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2013-11-21 9:06 Brian Dolbec
2013-11-21 9:06 Brian Dolbec
2013-11-21 9:06 Brian Dolbec
2013-11-21 9:06 Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1392831715.84cc9e2cdcea063e2d6bd8bb8489df9f4a380353.dol-sen@gentoo \
--to=brian.dolbec@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox