Clean up the debug code that I've added to stage1, move it to chroot_functions.sh...
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 20 Feb 2008 01:27:45 +0000 (01:27 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 20 Feb 2008 01:27:45 +0000 (01:27 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1305 d1e1f19c-881f-0410-ab34-b69fee027534

12 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/netboot2/netboot2-pkg.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/pre-kmerge.sh

index 392d2f2e4fc75b96f18d7603fdc31dcfa93a1550..a836db0a97bfefd9c7ddc988e2b1d84729d5df77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,16 @@
 # 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/netboot2/netboot2-pkg.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/pre-kmerge.sh:
+  Clean up the debug code that I've added to stage1, move it to
+  chroot_functions.sh, and call it from all of our main targets.
+
   14 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
   modules/generic_stage_target.py:
   Wow. I need to make sure that we actually comment comments in make.conf or
index b7c7e88d26eb307f5413dd22bed622d704b81393..f1d63d64786b6a9d2080d6130f285fd21cfef1fa 100755 (executable)
@@ -6,6 +6,8 @@ update_env_settings
 
 setup_myfeatures
 
+show_debug
+
 # Setup the environment
 export DESTROOT="${clst_root_path}"
 export clst_root_path="/"
index 69f4145328cb9a2f1f5f1007d1be445b0a9c16fb..7f1c05e9a96a55b432b39f98e10abb188a7b774e 100755 (executable)
@@ -4,10 +4,10 @@
 
 update_env_settings
 
-[ -f /tmp/envscript ] && source /tmp/envscript
-
 setup_myfeatures
 
+show_debug
+
 ## START BUILD
 setup_portage
 
index 5274937abfc5c66bac28410b818f6d48ae827793..c9c4cbfc11039b4e509790f86e9ffc7b88beaeb5 100755 (executable)
@@ -6,6 +6,8 @@ update_env_settings
 
 setup_myfeatures
 
+show_debug
+
 ## START BUILD
 setup_portage
 
index 370ec0c7011714ec2fbc28bc1c2256ad9bc80920..6cfabbccbe2575c6052dc02590433c243e628d37 100755 (executable)
@@ -6,5 +6,7 @@ update_env_settings
 
 setup_myfeatures
 
+show_debug
+
 # START BUILD
 run_emerge "${clst_packages}"
index bf51a0b35d3d54b89ab0e8514509bfe91fa0ec52..3e302127772062f91558d129dbb5e7cf91069dce 100644 (file)
@@ -6,6 +6,8 @@ update_env_settings
 
 setup_myfeatures
 
+show_debug
+
 # Setup our environment
 export FEATURES="${clst_myfeatures}"
 
index 62fd52ba4726ec40a31c4ab104a446b3840066ef..36b5d9480af74cd0dc8b38141092bb1156b9354e 100755 (executable)
@@ -6,6 +6,8 @@ update_env_settings
 
 setup_myfeatures
 
+show_debug
+
 # Setup our environment
 export clst_buildpkgs="$(/tmp/build.py)"
 export STAGE1_USE="$(portageq envvar STAGE1_USE)"
@@ -21,20 +23,6 @@ then
        exit 1
 fi
 
-if [ "${clst_DEBUG}" = "1" ]
-then
-       echo "DEBUG:"
-       echo "Profile inheritance:"
-       python -c 'import portage; print portage.settings.profiles'
-       echo "STAGE1_USE:                $(portageq envvar STAGE1_USE)"
-       echo "USE (profile):             $(portageq envvar USE)"
-       echo "USE (stage1):              ${USE}"
-       echo "FEATURES (profile):        $(portageq envvar FEATURES)"
-       echo "FEATURES (stage1):         ${FEATURES}"
-
-       exit 1
-fi
-
 ## START BUILD
 clst_root_path=/ setup_portage
 
index ec9016cc729acd29f9ee92614d107b33104c00cd..dc8d24077c129b67f1682ea427e8ec30dfbde349 100755 (executable)
@@ -6,6 +6,8 @@ update_env_settings
 
 setup_myfeatures
 
+show_debug
+
 # Setup the environment
 export FEATURES="${clst_myfeatures} nodoc noman noinfo"
 
index 7e1665ecdf497ec82adfe4373346743846094373..92ab2ab690a80b0f22e2979ec957e22109c23db9 100755 (executable)
@@ -6,12 +6,12 @@ update_env_settings
 
 setup_myfeatures
 
-## START BUILD
-# We need portage to be merged manually with USE="build" set to avoid frying
-# our make.conf, otherwise, the system target could take care of it.
+show_debug
 
 setup_portage
 
+## START BUILD
+
 run_emerge "-e system"
 
 rm -f /var/lib/portage/world
index 7b6f08be3877806459ad92a4fddeddf7c9c661fa..c2443d110376b2eaab23739d9cc9f5c88b6fdc5d 100755 (executable)
@@ -6,6 +6,8 @@ update_env_settings
 
 setup_myfeatures
 
+show_debug
+
 ## START BUILD
 setup_portage
 
index e7ab348e5cfa1175b19db1a70cff46d3b7e84fdf..426843e06874fcc25ff97974ae0d463fd52c2c04 100755 (executable)
@@ -118,7 +118,7 @@ setup_myfeatures(){
 }
 
 setup_myemergeopts(){
-       if [ -n "${clst_VERBOSE}" ]
+       if [ -n "${clst_VERBOSE}" ] || [ -n "${clst_DEBUG}" ]
        then
                clst_myemergeopts="--verbose"
        else
@@ -283,9 +283,9 @@ function copy_symlink() {
                cp -vfdp ${1} ${clst_root_path}/${1}
        
        if [[ -n $(type -p realpath) ]]; then
-           TARGET=`realpath ${1}`
+               TARGET=`realpath ${1}`
        else
-           TARGET=`readlink -f ${1}`
+               TARGET=`readlink -f ${1}`
        fi
        if [ -h ${TARGET} ]
        then
@@ -331,3 +331,31 @@ 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 a224a2318e73ad575afc869bb539420a2fc7d8b4..2570ce3212e7b186184b72e3a961a44a44d79a73 100755 (executable)
@@ -4,6 +4,10 @@
 
 update_env_settings
 
+setup_myfeatures
+
+show_debug
+
 if [ -n "${clst_FETCH}" ]
 then
        export clst_myemergeopts="${clst_myemergeopts} -f"
@@ -11,7 +15,6 @@ fi
 
 case ${clst_target} in
        livecd*|stage4)
-               export USE="livecd"
                run_emerge --oneshot genkernel
                install -d /tmp/kerncache