Removing any functions that we now call by default when we source chroot-functions...
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 20 Feb 2008 01:45:39 +0000 (01:45 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 20 Feb 2008 01:45:39 +0000 (01:45 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1306 d1e1f19c-881f-0410-ab34-b69fee027534

16 files changed:
ChangeLog
targets/embedded/embedded-chroot.sh
targets/grp/grp-chroot.sh
targets/livecd-stage1/livecd-stage1-chroot.sh
targets/netboot/netboot-chroot.sh
targets/stage1/stage1-chroot.sh
targets/stage2/stage2-chroot.sh
targets/stage3/stage3-chroot.sh
targets/stage4/stage4-chroot.sh
targets/support/chroot-functions.sh
targets/support/kmerge.sh
targets/support/livecdfs-update.sh
targets/support/post-kmerge.sh
targets/support/pre-kmerge.sh
targets/support/unmerge.sh
targets/tinderbox/tinderbox-chroot.sh

index a836db0a97bfefd9c7ddc988e2b1d84729d5df77..0fcc89bbfa4325b08502b3e8da2f58ca906bc332 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,18 @@
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  20 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+  targets/embedded/embedded-chroot.sh, targets/grp/grp-chroot.sh,
+  targets/livecd-stage1/livecd-stage1-chroot.sh,
+  targets/netboot/netboot-chroot.sh, targets/stage1/stage1-chroot.sh,
+  targets/stage2/stage2-chroot.sh, targets/stage3/stage3-chroot.sh,
+  targets/stage4/stage4-chroot.sh, targets/support/chroot-functions.sh,
+  targets/support/kmerge.sh, targets/support/livecdfs-update.sh,
+  targets/support/post-kmerge.sh, targets/support/pre-kmerge.sh,
+  targets/support/unmerge.sh, targets/tinderbox/tinderbox-chroot.sh:
+  Removing any functions that we now call by default when we source
+  chroot-functions.sh by default.
+
   20 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
   targets/embedded/embedded-chroot.sh, targets/grp/grp-chroot.sh,
   targets/livecd-stage1/livecd-stage1-chroot.sh,
index f1d63d64786b6a9d2080d6130f285fd21cfef1fa..6f2b97b024231dc20b723a3eee7f16b81492959c 100755 (executable)
@@ -2,12 +2,6 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
-
-setup_myfeatures
-
-show_debug
-
 # Setup the environment
 export DESTROOT="${clst_root_path}"
 export clst_root_path="/"
index 7f1c05e9a96a55b432b39f98e10abb188a7b774e..499a3901aa5d5fbd282af7cfaabb38fc5ada0ccf 100755 (executable)
@@ -2,12 +2,6 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
-
-setup_myfeatures
-
-show_debug
-
 ## START BUILD
 setup_portage
 
index c9c4cbfc11039b4e509790f86e9ffc7b88beaeb5..f18ab81000f99f1b6ae9626e58afdd2bd53d3965 100755 (executable)
@@ -2,12 +2,6 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
-
-setup_myfeatures
-
-show_debug
-
 ## START BUILD
 setup_portage
 
index 6cfabbccbe2575c6052dc02590433c243e628d37..5a541ae846c2dcb810c26c4b3e0b11758fd0200c 100755 (executable)
@@ -2,11 +2,5 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
-
-setup_myfeatures
-
-show_debug
-
 # START BUILD
 run_emerge "${clst_packages}"
index 36b5d9480af74cd0dc8b38141092bb1156b9354e..3ec42db99b9582c1a6d91c0771d4ef2a13ab264b 100755 (executable)
@@ -2,12 +2,6 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
-
-setup_myfeatures
-
-show_debug
-
 # Setup our environment
 export clst_buildpkgs="$(/tmp/build.py)"
 export STAGE1_USE="$(portageq envvar STAGE1_USE)"
index dc8d24077c129b67f1682ea427e8ec30dfbde349..40c627edc7cbc8d484d5a38045b09b619b3a6aac 100755 (executable)
@@ -2,12 +2,6 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
-
-setup_myfeatures
-
-show_debug
-
 # Setup the environment
 export FEATURES="${clst_myfeatures} nodoc noman noinfo"
 
index 92ab2ab690a80b0f22e2979ec957e22109c23db9..1daf0341c464b1ba3dd0dcf70e10d1f80424b558 100755 (executable)
@@ -2,15 +2,8 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
-
-setup_myfeatures
-
-show_debug
-
-setup_portage
-
 ## START BUILD
+setup_portage
 
 run_emerge "-e system"
 
index c2443d110376b2eaab23739d9cc9f5c88b6fdc5d..686fb49f5b578a20c3503f6e24db4dbc7d7def43 100755 (executable)
@@ -2,12 +2,6 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
-
-setup_myfeatures
-
-show_debug
-
 ## START BUILD
 setup_portage
 
index 426843e06874fcc25ff97974ae0d463fd52c2c04..54277041a7ad483c03b7c48c204b7c3176dd394e 100755 (executable)
@@ -13,7 +13,10 @@ trap "echo SIGKILL signal recieved killing $0 with pid $$;kill -9 $$" SIGKILL
 #      * user types ctrl-c
 #      * kernel recognizes this and generates SIGINT signal
 trap "echo SIGINT signal recieved killing $0 with pid $$;kill -9 $$" SIGINT
+
+# We do this everywhere, so why not put it in this script
+run_default_funcs
+
 check_genkernel_version(){
        if [ -x /usr/bin/genkernel ]
        then
@@ -118,7 +121,7 @@ setup_myfeatures(){
 }
 
 setup_myemergeopts(){
-       if [ -n "${clst_VERBOSE}" ] || [ -n "${clst_DEBUG}" ]
+       if [ -n "${clst_VERBOSE}" ]
        then
                clst_myemergeopts="--verbose"
        else
@@ -243,6 +246,43 @@ run_emerge() {
        emerge ${clst_myemergeopts} $@ || exit 1
 }
 
+show_debug() {
+       if [ "${clst_DEBUG}" = "1" ]
+       then
+               echo "DEBUG:"
+               echo "Profile inheritance:"
+               python -c 'import portage; print portage.settings.profiles'
+               echo
+               echo "STAGE1_USE:            $(portageq envvar STAGE1_USE)"
+               echo
+               echo "USE (profile):         $(portageq envvar USE)"
+               echo "USE (stage1):          ${USE}"
+               echo "FEATURES (profile):    $(portageq envvar FEATURES)"
+               echo "FEATURES (stage1):     ${FEATURES}"
+               echo
+               echo "ARCH:                  $(portageq envvar ARCH)"
+               echo "CHOST:                 $(portageq envvar CHOST)"
+               echo "CFLAGS:                $(portageq envvar CFLAGS)"
+               echo
+               echo "PROFILE_ARCH:          $(portageq envvar PROFILE_ARCH)"
+               echo
+               echo "ABI:                   $(portageq envvar ABI)"
+               echo "DEFAULT_ABI:           $(portageq envvar DEFAULT_ABI)"
+               echo "KERNEL_ABI:            $(portageq envvar KERNEL_ABI)"
+               echo "MULTILIB_ABIS:         $(portageq envvar MULTILIB_ABIS)"
+               echo
+       fi
+}
+
+run_default_funcs() {
+       if [ -z "${RUN_DEFAULT_FUNCS}" ]
+       then
+               update_env_settings
+               setup_myfeatures
+               show_debug
+       fi
+}
+
 # Functions
 # Copy libs of a executable in the chroot
 function copy_libs() {
@@ -331,31 +371,3 @@ GenericName=Gentoo Linux Handbook
 Comment=This is a link to the local copy of the Gentoo Linux Handbook.
 Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop
 }
-
-show_debug() {
-       if [ "${clst_DEBUG}" = "1" ]
-       then
-               echo "DEBUG:"
-               echo "Profile inheritance:"
-               python -c 'import portage; print portage.settings.profiles'
-               echo
-               echo "STAGE1_USE:            $(portageq envvar STAGE1_USE)"
-               echo
-               echo "USE (profile):         $(portageq envvar USE)"
-               echo "USE (stage1):          ${USE}"
-               echo "FEATURES (profile):    $(portageq envvar FEATURES)"
-               echo "FEATURES (stage1):     ${FEATURES}"
-               echo
-               echo "ARCH:                  $(portageq envvar ARCH)"
-               echo "CHOST:                 $(portageq envvar CHOST)"
-               echo "CFLAGS:                $(portageq envvar CFLAGS)"
-               echo
-               echo "PROFILE_ARCH:          $(portageq envvar PROFILE_ARCH)"
-               echo
-               echo "ABI:                   $(portageq envvar ABI)"
-               echo "DEFAULT_ABI:           $(portageq envvar DEFAULT_ABI)"
-               echo "KERNEL_ABI:            $(portageq envvar KERNEL_ABI)"
-               echo "MULTILIB_ABIS:         $(portageq envvar MULTILIB_ABIS)"
-               echo
-       fi
-}
index 128a85a2d5004298f24b79325151ac16af4cc0d9..111d374241edcd37669f9b080bb1622f3de98e6f 100755 (executable)
@@ -1,11 +1,12 @@
 #!/bin/bash
 
-source /tmp/chroot-functions.sh
+RUN_DEFAULT_FUNCS="no"
 
-mkdir -p /tmp/kerncache
+source /tmp/chroot-functions.sh
 
 check_genkernel_version
 
+mkdir -p /tmp/kerncache
 PKGDIR=/tmp/kerncache/${clst_kname}/ebuilds
 
 setup_gk_args() {
index c5d8a48dc4a29d3681223ff8ce4e412f05790d1e..2829a05850e571666aa1522b5c642acef1a5e6f8 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-source /tmp/chroot-functions.sh
+RUN_DEFAULT_FUNCS="no"
 
-update_env_settings
+source /tmp/chroot-functions.sh
 
 # Allow root logins to our CD by default
 if [ -e /etc/sshd/sshd_config ]
index 951740b20dca5ad75d6f3074696476f205739c5b..c17680c445bfdb5abebd89a411a61ee0f2b228ab 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-. /tmp/chroot-functions.sh
+RUN_DEFAULT_FUNCS="no"
 
-update_env_settings
+source /tmp/chroot-functions.sh
 
 # Only run depscan.sh if modules exist
 if [ -n "$(ls /lib/modules)" ]
index 2570ce3212e7b186184b72e3a961a44a44d79a73..d86ff13b931e3b28788b4f2d1eb3abe040800386 100755 (executable)
@@ -2,17 +2,6 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
-
-setup_myfeatures
-
-show_debug
-
-if [ -n "${clst_FETCH}" ]
-then
-       export clst_myemergeopts="${clst_myemergeopts} -f"
-fi
-
 case ${clst_target} in
        livecd*|stage4)
                run_emerge --oneshot genkernel
index 43aefd0be94564227a51fc01c200965f331a20ab..b5aec801d3d5949d248d1b0abbb3d320482a243c 100644 (file)
@@ -2,8 +2,6 @@
 
 source /tmp/chroot-functions.sh
 
-update_env_settings
-
 run_emerge -C ${clst_packages}
 
 exit 0
index a4b55e3e2e7d05effcabb9a64fe1c46fdd9715b1..8f98d0930bee1ff9fd5cf54f2505bb6be0855095 100755 (executable)
@@ -2,10 +2,6 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
-
-setup_myfeatures
-
 # START THE BUILD
 setup_portage