From 7841bfb64341faae0e749cfd6a6a77fe81a147e1 Mon Sep 17 00:00:00 2001 From: "John P. Davis" Date: Tue, 19 Oct 2004 04:06:35 +0000 Subject: [PATCH] kernel caching now dependent on pkgcache git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@470 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 7 ++++++- catalyst | 10 +++++----- files/catalyst.conf | 4 ++-- livecd/runscript-support/kmerge.sh | 13 ++++++++----- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 194d739b..f3590bdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.99 2004/10/19 03:39:36 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.100 2004/10/19 04:06:35 zhen Exp $ + + 19 Oct 2004; John Davis catalyst, files/catalyst.conf, + livecd/runscript-support/kmerge.sh: + made kernel caching dependent on the "pkgcache" option so that genkernel's + postconf can actually work 18 Oct 2004; John Davis livecd/runscript/x86-archscript.sh, livecd/runscript-support/kmerge.sh, diff --git a/catalyst b/catalyst index 91e66d1d..341fc697 100755 --- a/catalyst +++ b/catalyst @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.50 2004/10/15 02:48:20 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.51 2004/10/19 04:06:35 zhen Exp $ # Maintained in full by John Davis @@ -14,14 +14,14 @@ conf_values={} def usage(): print "Usage catalyst [options] [-C variable=value...] [ -s identifier]" - print " -h --help print this help message" - print " -v --version display version information" - print " -d --debug enable debugging" print " -c --config use specified configuration file" print " -C --cli catalyst commandline (MUST BE LAST OPTION)" + print " -d --debug enable debugging" print " -f --file read specfile" - print " -V --verbose verbose output" + print " -h --help print this help message" print " -s --snapshot generate a Portage snapshot" + print " -v --version display version information" + print " -V --verbose verbose output" print print "Usage examples:" print diff --git a/files/catalyst.conf b/files/catalyst.conf index 304a6ec1..979292c9 100644 --- a/files/catalyst.conf +++ b/files/catalyst.conf @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/files/catalyst.conf,v 1.6 2004/10/15 02:37:56 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/files/catalyst.conf,v 1.7 2004/10/19 04:06:35 zhen Exp $ # Simple desriptions of catalyst settings. Please refer to the online # documentation for more information. @@ -11,8 +11,8 @@ distdir="/usr/portage/distfiles" # options set different build-time options for catalyst. Some examples are: # ccache = enables build time ccache support (highly recommended) -# pkgcache = keeps a tbz2 of every built package (useful if your build stops prematurely) # distcc = enable distcc support for building. You have to set distcc_hosts in your spec file. +# pkgcache = keeps a tbz2 of every built package (useful if your build stops prematurely) options="ccache pkgcache" # sharedir specifies where all of the catalyst runtime executables are. Most users do diff --git a/livecd/runscript-support/kmerge.sh b/livecd/runscript-support/kmerge.sh index 8aaeda7d..b48f4e06 100755 --- a/livecd/runscript-support/kmerge.sh +++ b/livecd/runscript-support/kmerge.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.15 2004/10/19 03:39:36 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.16 2004/10/19 04:06:35 zhen Exp $ die() { echo "$1" @@ -47,8 +47,11 @@ build_kernel() { --postconf="emerge ${clst_kernel_postconf}" || exit 1 # pack up the modules for resuming - tar cjpf /usr/portage/packages/gk_binaries/${1}-modules-${clst_version_stamp}.tar.bz2 \ - /lib/modules/"${1}" || die "Could not package kernel modules, exiting" + if [ -n "${clst_PKGCACHE}" ] + then + tar cjpf /usr/portage/packages/gk_binaries/${1}-modules-${clst_version_stamp}.tar.bz2 \ + /lib/modules/"${1}" || die "Could not package kernel modules, exiting" + fi } @@ -110,7 +113,7 @@ then # test to see if the kernel .configs are the same, if so, then we skip kernel building test1=$(md5sum /var/tmp/${clst_kname}.config | cut -d " " -f 1) test2=$(md5sum /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config | cut -d " " -f 1) - if [ "${test1}" == "${test2}" ] + if [ "${test1}" == "${test2}" -a -n "${clst_PKGCACHE}" ] then echo echo "No kernel configuration change, skipping kernel build..." @@ -140,4 +143,4 @@ emerge -C ${clst_ksource} unset USE # keep the config around so that we can resume at some point -cp /var/tmp/${clst_kname}.config /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config +[ -n "${clst_PKGCACHE}" ] && cp /var/tmp/${clst_kname}.config /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config -- 2.26.2