move unmerge.sh to support;move the CLEAN_DELAY,EMERGE_WARNING_DELAY, and CONFIG_PROT...
authorEric Edgar <rocket@gentoo.org>
Thu, 8 Dec 2005 15:16:48 +0000 (15:16 +0000)
committerEric Edgar <rocket@gentoo.org>
Thu, 8 Dec 2005 15:16:48 +0000 (15:16 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@948 d1e1f19c-881f-0410-ab34-b69fee027534

20 files changed:
ChangeLog
modules/generic_stage_target.py
targets/embedded/embedded-chroot.sh
targets/grp/grp-chroot.sh
targets/livecd-stage1/livecd-stage1-chroot.sh
targets/livecd-stage2/livecd-stage2-controller.sh
targets/livecd-stage2/unmerge.sh [deleted file]
targets/netboot/netboot-chroot.sh
targets/stage1/stage1-chroot.sh
targets/stage2/stage2-chroot.sh
targets/stage2/stage2-preclean-chroot.sh
targets/stage3/stage3-chroot.sh
targets/stage3/stage3-preclean-chroot.sh
targets/stage4/stage4-chroot.sh
targets/stage4/stage4-controller.sh
targets/stage4/unmerge.sh [deleted file]
targets/support/chroot-functions.sh
targets/support/pre-kmerge.sh
targets/support/unmerge.sh [new file with mode: 0644]
targets/tinderbox/tinderbox-chroot.sh

index f24a973282af54cf6a1d19a4fbee879e907acbf4..5269ad785cc12b415898471735f099bbcc4cdd76 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.435 2005/12/08 14:48:58 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.436 2005/12/08 15:16:48 rocket Exp $
+
+  08 Dec 2005; Eric Edgar <rocket@gentoo.org>
+  modules/generic_stage_target.py, targets/embedded/embedded-chroot.sh,
+  targets/grp/grp-chroot.sh, targets/livecd-stage1/livecd-stage1-chroot.sh,
+  targets/livecd-stage2/livecd-stage2-controller.sh,
+  -targets/livecd-stage2/unmerge.sh, targets/netboot/netboot-chroot.sh,
+  targets/stage1/stage1-chroot.sh, targets/stage2/stage2-chroot.sh,
+  targets/stage2/stage2-preclean-chroot.sh, targets/stage3/stage3-chroot.sh,
+  targets/stage3/stage3-preclean-chroot.sh, targets/stage4/stage4-chroot.sh,
+  targets/stage4/stage4-controller.sh, -targets/stage4/unmerge.sh,
+  targets/support/chroot-functions.sh, targets/support/pre-kmerge.sh,
+  +targets/support/unmerge.sh, targets/tinderbox/tinderbox-chroot.sh:
+  move unmerge.sh to support;move the CLEAN_DELAY,EMERGE_WARNING_DELAY, and
+  CONFIG_PROTECT stuff in the run_emerge function for cleanliness
 
   08 Dec 2005; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
   files/catalyst.1:
index c7b59ba4d52581d597c453865b2efde8e2eccc70..16f3b0573d93c18c88e4cc5d1c773f7b46eeee0e 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.91 2005/12/07 21:01:35 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.92 2005/12/08 15:16:48 rocket Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -1015,8 +1015,10 @@ class generic_stage_target(generic_target):
                    
                    #before cleaning, unmerge stuff:
                    try:
-                       cmd("/bin/bash "+self.settings["sharedir"]+"/targets/" \
-                               +self.settings["target"]+"/unmerge.sh "+myunmerge,"Unmerge script failed.",env=self.env)
+                       cmd("/bin/bash "+self.settings["controller_file"]+" unmerge "+ myunmerge,\
+                               "Unmerge script failed.",env=self.env)
+                       #cmd("/bin/bash "+self.settings["sharedir"]+"/targets/" \
+                       #       +self.settings["target"]+"/unmerge.sh "+myunmerge,"Unmerge script failed.",env=self.env)
                        print "unmerge shell script"
                    except CatalystError:
                        self.unbind()
index 22ced74835daa89aca7db1ceb9b31600ae487eac..429365a67cfad230306e74c4ad626a8df65279e0 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/embedded/embedded-chroot.sh,v 1.17 2005/11/29 20:30:42 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.18 2005/12/08 15:16:48 rocket Exp $
 
 . /tmp/chroot-functions.sh
 
@@ -15,7 +15,6 @@ setup_myemergeopts
 
 # setup the environment
 export FEATURES="${clst_myfeatures}"
-export CONFIG_PROTECT="-*"
 #export clst_myemergeopts="${clst_myemergeopts} -O"
 export USE="${clst_use}"
 export DESTROOT=${clst_root_path}
@@ -29,6 +28,5 @@ run_emerge "${clst_myemergeopts}" -o "${clst_embedded_packages}"
 
 export clst_root_path=${DESTROOT}
 export clst_myemergeopts="${clst_myemergeopts} -1 -O"
-INSTALL_MASK="${clst_install_mask}" run_emerge "${clst_embedded_packages}"
-
+export INSTALL_MASK="${clst_install_mask}" 
+run_emerge "${clst_embedded_packages}"
index 8eaea9297bf1d52becffca44880bf325b732e703..39e223b56660128e7da47697bc27dd6a93b4098a 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/grp/grp-chroot.sh,v 1.22 2005/11/29 20:30:42 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-chroot.sh,v 1.23 2005/12/08 15:16:48 rocket Exp $
 
 . /tmp/chroot-functions.sh
 
@@ -16,7 +16,6 @@ setup_myfeatures
 
 # setup the environment
 export FEATURES="${clst_myfeatures}"
-export CONFIG_PROTECT="-*"
 ## START BUILD
 setup_portage
 
index b5f84dd9db6e68b76d2445f0d495bf942022288d..fc00cd131ad242f7da0bb3656d459d02913551fd 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/livecd-stage1/livecd-stage1-chroot.sh,v 1.20 2005/12/07 21:33:43 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-chroot.sh,v 1.21 2005/12/08 15:16:48 rocket Exp $
 
 . /tmp/chroot-functions.sh
 
@@ -14,8 +14,6 @@ setup_myemergeopts
 ## setup the environment
 
 export FEATURES="${clst_myfeatures}"
-export CONFIG_PROTECT="-*"
-export EMERGE_WARNING_DELAY=0
 
 ## START BUILD
 setup_portage
index dc94b2601ac1f97266a118909b4aec2e33ce5a38..f4fe24426dc07706c8c2ce1c4bef7ec544bf4dd5 100755 (executable)
@@ -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/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.16 2005/11/30 21:34:03 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.17 2005/12/08 15:16:48 rocket Exp $
 . ${clst_sharedir}/targets/support/functions.sh
 . ${clst_sharedir}/targets/support/filesystem-functions.sh
 
@@ -111,6 +111,12 @@ case $1 in
                
                ${clst_sharedir}/targets/support/bootloader-setup.sh $1
                ;;
+    
+    unmerge)
+        shift
+        export clst_packages="$*"
+        exec_in_chroot ${clst_sharedir}/targets/support/unmerge.sh
+    ;;
 
        target_image_setup)
                shift
diff --git a/targets/livecd-stage2/unmerge.sh b/targets/livecd-stage2/unmerge.sh
deleted file mode 100644 (file)
index 4c98a58..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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/Attic/unmerge.sh,v 1.10 2005/12/07 21:57:59 wolf31o2 Exp $
-
-${clst_CHROOT} ${clst_chroot_path} /bin/bash << EOF
-       EMERGE_WARNING_DELAY=0 emerge -C $*
-EOF
-
-exit 0
index 8393aa444930b43827ee9b0a6a960bd6b3987ff1..6bc377403f2825999b8e2c903823e0506db82708 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-chroot.sh,v 1.2 2005/07/05 21:53:41 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/netboot-chroot.sh,v 1.3 2005/12/08 15:16:48 rocket Exp $
 . /tmp/chroot-functions.sh
 
 update_env_settings
@@ -12,7 +12,6 @@ setup_myemergeopts
 
 # setup our environment
 export FEATURES="${clst_myfeatures}"
-export CONFIG_PROTECT="-*"
 export USE_ORDER="env:pkg:conf:defaults"
 
 # START BUILD
index a5695441ef0a56d2e850f2991c5c22646435bd46..4ce3a658607e16a339e1ccc41a8a11ac267584dd 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/stage1/stage1-chroot.sh,v 1.38 2005/12/07 21:33:43 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.39 2005/12/08 15:16:48 rocket Exp $
        
 
 . /tmp/chroot-functions.sh
@@ -19,7 +19,6 @@ export clst_buildpkgs="$(/tmp/build.py)"
 export STAGE1_USE="$(portageq envvar STAGE1_USE)"
 export USE="-* build ${STAGE1_USE}"
 export FEATURES="${clst_myfeatures} nodoc noman noinfo"
-export EMERGE_WARNING_DELAY=0
 
 ## Sanity check profile
 if [ -z "${clst_buildpkgs}" ]
index 7ae088c2519511858e8106a95c13b692ecc1c77d..193df8c36bc24eb64510673114e33c324d589047 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/stage2/stage2-chroot.sh,v 1.16 2005/12/07 21:33:43 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/stage2-chroot.sh,v 1.17 2005/12/08 15:16:48 rocket Exp $
 
 . /tmp/chroot-functions.sh
 
@@ -13,7 +13,6 @@ setup_myemergeopts
 
 ## setup the environment
 export FEATURES="${clst_myfeatures} nodoc noman noinfo"
-export EMERGE_WARNING_DELAY=0
 
 if [ "${clst_VERBOSE}" ]
 then
index ebae84ff1bf082e4b1302e9ed3506192e6bef73c..8103aa7d3e6155b283420c786e54544b862a4cc7 100755 (executable)
@@ -1,21 +1,20 @@
 #!/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/stage2/stage2-preclean-chroot.sh,v 1.7 2005/08/09 19:02:31 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/stage2-preclean-chroot.sh,v 1.8 2005/12/08 15:16:48 rocket Exp $
 
 . /tmp/chroot-functions.sh
 update_env_settings
 
-export CONFIG_PROTECT="-*"
 
 if [ -n "${clst_CCACHE}" ]
 then
-       emerge -C dev-util/ccache || exit 1
+       run_emerge -C dev-util/ccache || exit 1
 fi
 
 if [ -n "${clst_DISTCC}" ]
 then
-       emerge -C sys-devel/distcc || exit 1
+       run_emerge -C sys-devel/distcc || exit 1
 fi
 
 rm -f /var/log/emerge.log
index d2ae6af7bd0379f5f031cc35e9d83566a2852645..a6828631f60122af0c1e9cc1ad64b54c63439be9 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/stage3/stage3-chroot.sh,v 1.23 2005/12/07 21:33:43 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-chroot.sh,v 1.24 2005/12/08 15:16:48 rocket Exp $
 
 . /tmp/chroot-functions.sh
 check_portage_version
@@ -14,9 +14,7 @@ setup_myemergeopts
 
 # setup the build environment
 export FEATURES="${clst_myfeatures}"
-export CONFIG_PROTECT="-*"
 export USE="${USE} ${clst_HOSTUSE}"
-export EMERGE_WARNING_DELAY=0
 
 ## START BUILD
 # portage needs to be merged manually with USE="build" set to avoid frying our
index d44a88974723778767bf247967eeeb7a643f96f2..39f8762b9ae80f12c5ea0a2a13a3af56fa2bd3dc 100755 (executable)
@@ -1,21 +1,19 @@
 #!/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/stage3/stage3-preclean-chroot.sh,v 1.7 2005/08/09 19:02:31 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-preclean-chroot.sh,v 1.8 2005/12/08 15:16:48 rocket Exp $
 
 . /tmp/chroot-functions.sh
 update_env_settings
 
-export CONFIG_PROTECT="-*"
-
 if [ -n "${clst_CCACHE}" ]
 then
-       emerge -C dev-util/ccache || exit 1
+       run_emerge -C dev-util/ccache || exit 1
 fi
 
 if [ -n "${clst_DISTCC}" ]
 then
-       emerge -C sys-devel/distcc || exit 1
+       run_emerge -C sys-devel/distcc || exit 1
 fi
 
 rm -f /var/log/emerge.log
index 4a94fd7e07ce85f4c095c8a055b50c8ce3f7138a..5bd3848c4cf5deea85cbbfe22fb33bfa8dc1f2be 100755 (executable)
@@ -12,7 +12,6 @@ setup_myemergeopts
 
 ## setup the environment
 export FEATURES="${clst_myfeatures}"
-export CONFIG_PROTECT="-*"
 
 ## START BUILD
 setup_portage
@@ -21,7 +20,6 @@ export USE_ORDER="env:pkg:conf:defaults"
 
 echo "Bringing system up to date using profile specific use flags"
 export USE="${USE} ${clst_HOSTUSE}"
-export EMERGE_WARNING_DELAY=0
 run_emerge -u system
 
 
index 45613632a0362d723e1763bb4afd49c469db3404..58f4ff81b0c51aeab9b6cb64d8174a4bdaf3402e 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.10 2005/11/30 21:34:03 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.11 2005/12/08 15:16:48 rocket Exp $
 . ${clst_sharedir}/targets/support/functions.sh
 
 
@@ -64,6 +64,12 @@ case $1 in
                #${clst_sharedir}/targets/livecd-stage2/livecd-stage2-cdfs.sh
                ${clst_sharedir}/targets/support/target_image_setup.sh $1
        ;;
+       
+       unmerge)
+               shift
+               export clst_packages="$*"
+               exec_in_chroot ${clst_sharedir}/targets/support/unmerge.sh 
+       ;;
 
        iso)
        
diff --git a/targets/stage4/unmerge.sh b/targets/stage4/unmerge.sh
deleted file mode 100644 (file)
index 649d11e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/Attic/unmerge.sh,v 1.2 2005/07/05 21:53:41 wolf31o2 Exp $
-
-${clst_CHROOT} ${clst_chroot_path} /bin/bash << EOF
-       EMERGE_WARNING_DELAY=0 emerge -C $*
-EOF
-
-exit 0
index 8114ee90ccd18b59e2640d35b8ea482e73e41b90..77d5a4bcd958a3af3ff5cd8cc106ba90b741d51a 100755 (executable)
@@ -151,6 +151,10 @@ run_emerge() {
        # with no options ROOT=/
        make_destpath ${clst_root_path}
        
+       export EMERGE_WARNING_DELAY=0   
+       export CLEAN_DELAY=0
+       export CONFIG_PROTECT="-*"
+
        if [ -n "${clst_VERBOSE}" ]
        then
                echo "ROOT=${ROOT} emerge ${clst_myemergeopts} -vpt $@" || exit 1
index 394fcb470a685c4ab496db0e5a04ccc36e8eb44e..e8ee812711286c9db82d3117c36664485bf74d10 100755 (executable)
@@ -7,7 +7,8 @@
 
 . /etc/profile
 
-CONFIG_PROTECT="-*" USE="livecd" emerge --oneshot genkernel 
+export USE="livecd"
+run_emerge --oneshot genkernel
 
 install -d /usr/portage/packages/gk_binaries
 
diff --git a/targets/support/unmerge.sh b/targets/support/unmerge.sh
new file mode 100644 (file)
index 0000000..ee4a4b9
--- /dev/null
@@ -0,0 +1,13 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/unmerge.sh,v 1.1 2005/12/08 15:16:48 rocket Exp $
+
+
+source /tmp/chroot-functions.sh
+
+check_portage_version
+update_env_settings
+
+run_emerge -C "${clst_packages}"
+
+exit 0
index ebabfc697e1e3308fda57662b8c165b1e4398cdc..55a5b87053755cfbd50009b752648bf63de1d5e6 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/tinderbox/tinderbox-chroot.sh,v 1.14 2005/11/22 20:36:18 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-chroot.sh,v 1.15 2005/12/08 15:16:48 rocket Exp $
 
 . /tmp/chroot-functions.sh
 
@@ -11,7 +11,6 @@ setup_myfeatures
 
 # setup the environment
 export FEATURES="${clst_myfeatures}"
-export CONFIG_PROTECT="-*"
 
 # START THE BUILD
 setup_portage
@@ -26,7 +25,7 @@ for x in ${clst_tinderbox_packages}
 do
        if [ -n "${clst_VERBOSE}" ]
        then
-               emerge --usepkg --buildpkg --newuse -vp $x
+               run_emerge --usepkg --buildpkg --newuse -vp $x
                echo "Press any key within 15 seconds to pause the build..."
                read -s -t 15 -n 1
                if [ $? -eq 0 ]
@@ -38,7 +37,7 @@ do
 
        mkdir -p /tmp/packages/$x
        export PORT_LOGDIR="/tmp/packages/$x"
-       emerge --usepkg --buildpkg --newuse $x
+       run_emerge --usepkg --buildpkg --newuse $x
        
        if [ "$?" != "0" ]
        then