Changed kernel build caching to use kerncache option, rather than pkgcache option...
authorChris Gianelloni <wolf31o2@gentoo.org>
Fri, 22 Oct 2004 04:23:16 +0000 (04:23 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Fri, 22 Oct 2004 04:23:16 +0000 (04:23 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@474 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
files/catalyst.conf
livecd/runscript-support/kmerge.sh
livecd/runscript-support/livecdfs-update.sh
targets/livecd-stage2/unmerge.sh
targets/netboot/netboot-kernel.sh

index 202a8c09bb6c0a90ccf1965ad5705ac468c8ad33..bea31b014b96e07ba8f6c174a12952a884f45ee4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,15 @@
 # ChangeLog for gentoo/src/catalyst 
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.103 2004/10/21 17:19:42 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.104 2004/10/22 04:23:16 wolf31o2 Exp $
+
+  22 Oct 2004; Chris Gianelloni <wolf31o2@gentoo.org> files/catalyst.conf,
+  livecd/runscript-support/kmerge.sh,
+  livecd/runscript-support/livecdfs-update.sh,
+  targets/livecd-stage2/unmerge.sh, targets/netboot/netboot-kernel.sh:
+  Changed kernel build caching to use kerncache option, rather than pkgcache
+  option. Fixed --postconf and --callback for builds that do not require them.
+  Removed delay when removing package sin the system profile. This is now
+  catalyst 1.1.0, so enjoy.
 
   21 Oct 2004; Chris Gianelloni <wolf31o2@gentoo.org>
   livecd/runscript-support/livecdfs-update.sh:
index 979292c92bfccc7c83ac85c12dc4262d16132927..035fe9cbb2828dc3a9275e1734ed7488f5004d36 100644 (file)
@@ -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.7 2004/10/19 04:06:35 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/files/catalyst.conf,v 1.8 2004/10/22 04:23:16 wolf31o2 Exp $
 
 # Simple desriptions of catalyst settings. Please refer to the online
 # documentation for more information.
@@ -11,9 +11,13 @@ distdir="/usr/portage/distfiles"
 
 # options set different build-time options for catalyst. Some examples are:
 # ccache = enables build time ccache support (highly recommended)
-# 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"
+# 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)
+# kerncache = keeps a tbz2 of your built kernel and modules (useful if your
+#      build stops in livecd-stage2)
+options="ccache pkgcache kerncache"
 
 # sharedir specifies where all of the catalyst runtime executables are. Most users do
 # not need to change this.
index 076e63999c2b71acf893584a0d688abd78215c25..608f8484a546226a9f808af5277a4fbefe5f920e 100755 (executable)
@@ -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.17 2004/10/21 17:06:21 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.18 2004/10/22 04:23:16 wolf31o2 Exp $
 
 die() {
        echo "$1"
@@ -34,18 +34,14 @@ build_kernel() {
                do
                        clst_kernel_postconf="${clst_kernel_postconf} ${x}"
                done
-               GK_ARGS="${GK_ARGS} --postconf=\"${clst_kernel_postconf}\""
        fi
 
        if [ -e "/var/tmp/${clst_kname}.packages" ]
        then
                for x in $( cat /var/tmp/${clst_kname}.packages )
                do
-                       # we don't want to use the pkgcache for these since the results
-                       # are kernel-dependent.
                        clst_kernel_merge="${clst_kernel_merge} ${x}"
                done
-               GK_ARGS="${GK_ARGS} --callback=\"${clst_kernel_merge}\""
        fi
        
        if [ "${clst_livecd_devmanager}" == "udev" ]
@@ -54,16 +50,31 @@ build_kernel() {
        fi
        
        # build with genkernel using the set options
-       # callback is put here to avoid escaping issues
-       genkernel ${GK_ARGS} || exit 1
-       
+       # callback and postconf are put here to avoid escaping issues
+       if [ -e "/var/tmp/${clst_kname}.packages" -a \
+       -e "/var/tmp/${clst_kname}.postconf" ]
+       then
+               genkernel --callback="emerge ${clst_kernel_merge}" \
+                       --postconf="emerge ${clst_kernel_postconf}" \
+                       ${GK_ARGS} || exit 1
+       elif [ -e "/var/tmp/${clst_kname}.packages" ]
+       then
+               genkernel --callback="emerge ${clst_kernel_merge}" \
+                       ${GK_ARGS} || exit 1
+       elif [ -e "/var/tmp/${clst_kname}.postconf" ]
+       then
+               genkernel --postconf="emerge ${clst_kernel_postconf}" \
+                       ${GK_ARGS} || exit 1
+       else
+               genkernel ${GK_ARGS} || exit 1
+       fi
+
        # pack up the modules for resuming
        if [ -n "${clst_KERNCACHE}" ]
        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"
+                       /lib/modules/${1} || die "Could not package kernel modules, exiting"
        fi
-
 }
 
 # Script to build each kernel, kernel-related packages
@@ -137,10 +148,16 @@ else
 fi
 
 /sbin/modules-update --assume-kernel=${clst_fudgeuname}
-               
+
 #now the unmerge... (wipe db entry)
 emerge -C ${clst_ksource}
 unset USE
 
+echo
 # keep the config around so that we can resume at some point
-[ -n "${clst_KERNCACHE}" ] && cp /var/tmp/${clst_kname}.config /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config
+if [ -n "${clst_KERNCACHE}" ]
+then
+       cp /var/tmp/${clst_kname}.config \
+       /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config
+fi
+echo
index 78ec24bcd14b8882e7472aba9b62f33e904a89f8..d8ad4a4682a9ece20762e639241fc9091a4ef4ae 100755 (executable)
@@ -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/livecdfs-update.sh,v 1.18 2004/10/21 17:19:42 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.19 2004/10/22 04:23:16 wolf31o2 Exp $
 
 /usr/sbin/env-update
 source /etc/profile
@@ -142,5 +142,5 @@ then
 fi
 
 # tar up the firmware so that it does not get clobbered by the livecd mounts
-[ -n $(ls /usr/lib/hotplug/firmware) ] && tar cjpf /usr/lib/hotplug/firmware.tar.bz2 /usr/lib/hotplug/firmware/*
+[ -n $(ls /usr/lib/hotplug/firmware) ] && tar cvjpf /usr/lib/hotplug/firmware.tar.bz2 /usr/lib/hotplug/firmware/*
 ln -sf /lib/firmware /usr/lib/hotplug/firmware
index 318c03083ae334b8a070df2f2173523034702ca7..8ef99809e94ec4d1776ef62edb4fcbe638f8115d 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/unmerge.sh,v 1.4 2004/10/15 02:46:58 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/Attic/unmerge.sh,v 1.5 2004/10/22 04:23:16 wolf31o2 Exp $
 
 $clst_CHROOT $clst_chroot_path /bin/bash << EOF
-       emerge -C $*
+       EMERGE_WARNING_DELAY=0 emerge -C $*
 EOF
 exit 0
index 227daa131917bc726799280f6f0345caa50389d7..9324c251fb9e96d5b9b492f51bff631d0257f479 100644 (file)
@@ -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/targets/netboot/Attic/netboot-kernel.sh,v 1.3 2004/10/11 14:19:30 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/Attic/netboot-kernel.sh,v 1.4 2004/10/22 04:23:16 wolf31o2 Exp $
 
 /usr/sbin/env-update
 source /etc/profile
@@ -16,7 +16,7 @@ export USE_ORDER="env:conf:defaults"
 mkdir -p ${GK_BINARIES}
 BUILD_KERNEL=1
 
-if [ -n "${clst_PKGCACHE}" ]
+if [ -n "${clst_KERNCACHE}" ]
 then
        GK_PKGDIR="$(portageq envvar PKGDIR)/All/genkernel"
        mkdir -p ${GK_PKGDIR}
@@ -55,7 +55,7 @@ then
        tar -jxf ${GK_BINARIES}/kernel.tar.bz2 -C ${GK_BINARIES}
        mv ${GK_BINARIES}/{${kernname},kernel} || exit 1 
 
-       if [ -n "${clst_PKGCACHE}" ]
+       if [ -n "${clst_KERNCACHE}" ]
        then
                case ${clst_mainarch} in
                        alpha|arm|sparc);;