Fix ctrl-c error if pre-kmerge.sh is running by sourcing /tmp/chroot-functions.sh...
authorEric Edgar <rocket@gentoo.org>
Fri, 15 Apr 2005 04:40:24 +0000 (04:40 +0000)
committerEric Edgar <rocket@gentoo.org>
Fri, 15 Apr 2005 04:40:24 +0000 (04:40 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@604 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/generic_stage_target.py
targets/support/kmerge.sh
targets/support/pre-kmerge.sh

index dd49a206a86236fabd755773870a41c59593099e..7432c935b3975a3e1e964bbe250293a6121c0e0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
 # ChangeLog for gentoo/src/catalyst 
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.219 2005/04/14 17:09:07 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.220 2005/04/15 04:40:24 rocket Exp $
+
+  15 Apr 2005; Eric Edgar <rocket@gentoo.org>
+  modules/generic_stage_target.py, targets/support/kmerge.sh,
+  targets/support/pre-kmerge.sh:
+  Fix ctrl-c error if pre-kmerge.sh is running by sourcing
+  /tmp/chroot-functions.sh and removed extra equal sign to fix a genkernel
+  caching bug
 
   14 Apr 2005; Eric Edgar <rocket@gentoo.org>
   modules/generic_stage_target.py, targets/support/kmerge.sh:
index 0f4d4e1271bdcb72de920add1f9c06036dcd4e25..7b943555155bf9905e1cd9f9f7d5ea7e0369ec81 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/modules/generic_stage_target.py,v 1.30 2005/04/14 17:09:07 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.31 2005/04/15 04:40:24 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -287,6 +287,7 @@ class generic_stage_target(generic_target):
                        self.valid_values.append("boot/kernel/"+x+"/use")
                        self.valid_values.append("boot/kernel/"+x+"/gk_kernargs")
                        self.valid_values.append("boot/kernel/"+x+"/gk_action")
+                       self.valid_values.append("boot/kernel/"+x+"/initramfs_overlay")
                        if self.settings.has_key("boot/kernel/"+x+"/postconf"):
                                print "boot/kernel/"+x+"/postconf is deprecated"
                                print "\tInternally moving these ebuilds to boot/kernel/"+x+"/packages"
@@ -453,6 +454,7 @@ class generic_stage_target(generic_target):
                                print "Copying overlay dir " +x
                                cmd("mkdir -p "+self.settings["chroot_path"]+x)
                                cmd("cp -R "+x+"/* "+self.settings["chroot_path"]+x)
+       
        def root_overlay(self):
            # copy over the root_overlay
            # Always copy over the overlay incase it has changed
@@ -868,10 +870,24 @@ class generic_stage_target(generic_target):
                                                self.settings["boot/kernel/"+kname+"/extraversion"]=""
 
                                        os.putenv("clst_kextraversion", self.settings["boot/kernel/"+kname+"/extraversion"])
-
+                                       if self.settings.has_key("boot/kernel/"+kname+"/initramfs_overlay"):
+                                           if os.path.exists(self.settings["boot/kernel/"+kname+"/initramfs_overlay"]):
+                                               print "Copying initramfs_overlay dir " +self.settings["boot/kernel/"+kname+"/initramfs_overlay"]
+                                               cmd("mkdir -p "+self.settings["chroot_path"]+"/tmp/initramfs_overlay/" + \
+                                                       self.settings["boot/kernel/"+kname+"/initramfs_overlay"])
+                                               cmd("cp -R "+self.settings["boot/kernel/"+kname+"/initramfs_overlay"]+"/* " + \
+                                                       self.settings["chroot_path"] + "/tmp/initramfs_overlay/" + \
+                                                       self.settings["boot/kernel/"+kname+"/initramfs_overlay"])
+       
+                                           
                                        # execute the script that builds the kernel
                                        cmd("/bin/bash "+self.settings["controller_file"]+" kernel "+kname,\
                                        "Runscript kernel build failed")
+                                       
+                                       if self.settings.has_key("boot/kernel/"+kname+"/initramfs_overlay"):
+                                               print "Cleaning up temporary overlay dir"
+                                               cmd("rm -R"+self.settings["chroot_path"]+"/tmp/initramfs_overlay/" + \
+                                                       self.settings["boot/kernel/"+kname+"/initramfs_overlay"])
 
                                touch(self.settings["autoresume_path"]+"build_kernel")
                        
index e7525c5e300804b118b5f929202cec70ac2bde6a..dd8abf5480492d09e3c5cb0a4821ab8e703d43e7 100755 (executable)
@@ -12,6 +12,7 @@ setup_gk_args() {
        # default genkernel args
        GK_ARGS="${clst_gk_mainargs} \
                         ${clst_kernel_gk_kernargs} \
+                        --cachedir=/usr/portage/packages/gk_binaries/${clst_kname}-genkernel_cache-${clst_version_stamp} \
                         --no-mountboot \
                         --no-install \
                         --kerneldir=/usr/src/linux \
@@ -30,6 +31,10 @@ setup_gk_args() {
                GK_ARGS="${GK_ARGS} --gensplash=${clst_splash_theme}"
        fi
 
+       if [ -n "${clst_initramfs_overlay}" ]
+       then
+               GK_ARGS="${GK_ARGS} --initramfs_overlay=/tmp/initramfs_overlay/${clst_initramfs_overlay}"
+       fi
        if [ -n "${clst_CCACHE}" ]
        then
                GK_ARGS="${GK_ARGS} --kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc"
index 57a1de0a2ea28e72c1ed85330a5b28d6bd1db07d..dcf9c8bad543ed33e9db97ff3140c4ac43e67c3b 100755 (executable)
@@ -2,8 +2,10 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+. /tmp/chroot-functions.sh
 /usr/sbin/env-update
-source /etc/profile
+
+. /etc/profile
 
 CONFIG_PROTECT="-*" USE="livecd" emerge --oneshot --nodeps genkernel