run pre_kmerge and post_kmerge only once
authorEric Edgar <rocket@gentoo.org>
Mon, 17 Oct 2005 19:01:06 +0000 (19:01 +0000)
committerEric Edgar <rocket@gentoo.org>
Mon, 17 Oct 2005 19:01:06 +0000 (19:01 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@866 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/generic_stage_target.py
targets/embedded/embedded-controller.sh
targets/livecd-stage2/livecd-stage2-controller.sh
targets/netboot/netboot-controller.sh
targets/stage4/stage4-controller.sh

index be89a1f7c9f779a20daa5dfa6f03dc7481da8d6d..5ae9ecc5aa1e38827af6c08f8228cc1ce98dbef1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.358 2005/10/17 17:11:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.359 2005/10/17 19:01:06 rocket Exp $
+
+  17 Oct 2005; Eric Edgar <rocket@gentoo.org>
+  modules/generic_stage_target.py, targets/embedded/embedded-controller.sh,
+  targets/livecd-stage2/livecd-stage2-controller.sh,
+  targets/netboot/netboot-controller.sh,
+  targets/stage4/stage4-controller.sh:
+  run pre_kmerge and post_kmerge only once
 
   17 Oct 2005; Eric Edgar <rocket@gentoo.org>
   targets/support/bootloader-setup.sh:
index e488bdf931acabc7cd3ebf11253fda8cad02e38d..f134875136e6592021d5aabbf0c67285290fa500 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 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.66 2005/10/13 17:13:35 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.67 2005/10/17 19:01:06 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -998,6 +998,9 @@ class generic_stage_target(generic_target):
                                mynames=self.settings["boot/kernel"]
                                if type(mynames)==types.StringType:
                                        mynames=[mynames]
+                               # execute the script that sets up the kernel build environment
+                               cmd("/bin/bash "+self.settings["controller_file"]+" pre-kmerge ",\
+                                  "Runscript pre-kmerge failed")
                
                                for kname in mynames:
                                        try:
@@ -1054,6 +1057,10 @@ class generic_stage_target(generic_target):
                                                print "Cleaning up temporary overlay dir"
                                                cmd("rm -R "+self.settings["chroot_path"]+"/tmp/initramfs_overlay/")
 
+                               # execute the script that cleans up the kernel build environment
+                               cmd("/bin/bash "+self.settings["controller_file"]+" post-kmerge ",\
+                                  "Runscript post-kmerge failed")
+                               
                                touch(self.settings["autoresume_path"]+"build_kernel")
                        
                        except CatalystError:
index 3ea50ca06aaaa3595e6e9e4b71a9abfe607e31e4..10c48acf4ec8336388ef9916198390ed40595553 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2003 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-controller.sh,v 1.5 2005/08/09 19:02:31 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-controller.sh,v 1.6 2005/10/17 19:01:06 rocket Exp $
 
 . ${clst_sharedir}/targets/support/functions.sh
 . ${clst_sharedir}/targets/support/filesystem-functions.sh
@@ -29,6 +29,15 @@ case $1 in
        
 #      ;;
 
+        pre-kmerge)
+                # Sets up the build environment before any kernels are compiled
+                exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
+                ;;
+        post-kmerge)
+                # Cleans up the build environment after the kernels are compiled
+                exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
+                ;;
+
        kernel)
                shift
                export clst_kname="$1"
@@ -37,11 +46,8 @@ case $1 in
                then
                        cp -a ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
                fi
-               exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
                exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
                delete_from_chroot tmp/linuxrc
-               exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
-       
        ;;
 
        target_image_setup)
index 16ccc28ca9651ec022c77de2cdb2c43bf5434ca0..2237f74d2080c5bd1696195a87826856a2569892 100755 (executable)
@@ -1,10 +1,18 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.13 2005/08/09 19:02:31 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.14 2005/10/17 19:01:06 rocket Exp $
 . ${clst_sharedir}/targets/support/functions.sh
 . ${clst_sharedir}/targets/support/filesystem-functions.sh
 
 case $1 in
+       pre-kmerge)
+               # Sets up the build environment before any kernels are compiled
+               exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
+               ;;
+       post-kmerge)
+               # Cleans up the build environment after the kernels are compiled
+               exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
+               ;;
        kernel)
                shift
                export clst_kname="$1"
@@ -14,10 +22,8 @@ case $1 in
                then
                        cp -a ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
                fi
-               exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
                exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
                delete_from_chroot tmp/linuxrc
-               exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
 
                extract_modules ${clst_chroot_path} ${clst_kname}
                #16:12 <@solar> kernel_name=foo
index 87efe2794df57d1fa1d08fab5b0268a113627b97..c7fcc7d5b26c811eff0dab488a5ef04cef256fe4 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-controller.sh,v 1.3 2005/07/05 21:53:41 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-controller.sh,v 1.4 2005/10/17 19:01:06 rocket Exp $
 . ${clst_sharedir}/targets/support/functions.sh
 . ${clst_sharedir}/targets/support/filesystem-functions.sh
 
@@ -34,6 +34,15 @@ case ${1} in
                exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
        ;;
 
+        pre-kmerge)
+                # Sets up the build environment before any kernels are compiled
+                #exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
+                ;;
+        post-kmerge)
+                # Cleans up the build environment after the kernels are compiled
+                #exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
+                ;;
+
        kernel)
                shift
                 export clst_kname="$1"
index e2f4dd3b41cd2a9e228e2191d7d6ea8eba1a9d35..3062f640a1705836b2c99ef284ff9f12fbb4e52d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.8 2005/08/09 19:02:31 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.9 2005/10/17 19:01:06 rocket Exp $
 . ${clst_sharedir}/targets/support/functions.sh
 
 
@@ -11,6 +11,14 @@ case $1 in
        enter)
                ${clst_CHROOT} ${clst_chroot_path}
        ;;
+        pre-kmerge)
+                # Sets up the build environment before any kernels are compiled
+                exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
+                ;;
+        post-kmerge)
+                # Cleans up the build environment after the kernels are compiled
+                exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
+                ;;
        kernel)
                shift
                export clst_kname="$1"
@@ -19,10 +27,8 @@ case $1 in
                then
                        cp -a ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
                fi
-               exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
                exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
                delete_from_chroot tmp/linuxrc
-               exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
                extract_modules ${clst_chroot_path} ${clst_kname}
                extract_kernel ${clst_chroot_path}/boot ${clst_kname}
        ;;