From fd5a49039587003e56ccef7981bfb6d553b9513b Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Thu, 28 Feb 2008 03:41:54 +0000 Subject: [PATCH] Rearrange some of the functions in chroot-functions.sh in preparation for some upcoming changes and rename setup_portage to setup_pkgmgr. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1332 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 8 ++++ targets/grp/grp-chroot.sh | 2 +- targets/livecd-stage1/livecd-stage1-chroot.sh | 2 +- targets/stage1/stage1-chroot.sh | 2 +- targets/stage3/stage3-chroot.sh | 2 +- targets/stage4/stage4-chroot.sh | 2 +- targets/support/chroot-functions.sh | 40 +++++++++---------- targets/tinderbox/tinderbox-chroot.sh | 2 +- 8 files changed, 34 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc188ad8..bd9a11a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 28 Feb 2008; Chris Gianelloni + targets/grp/grp-chroot.sh, targets/livecd-stage1/livecd-stage1-chroot.sh, + targets/stage1/stage1-chroot.sh, targets/stage3/stage3-chroot.sh, + targets/stage4/stage4-chroot.sh, targets/support/chroot-functions.sh, + targets/tinderbox/tinderbox-chroot.sh: + Rearrange some of the functions in chroot-functions.sh in preparation for + some upcoming changes and rename setup_portage to setup_pkgmgr. + 28 Feb 2008; Chris Gianelloni targets/stage1/stage1-controller.sh: Removing an extra env-update call from stage1's preclean. diff --git a/targets/grp/grp-chroot.sh b/targets/grp/grp-chroot.sh index df0da4de..d3465bae 100755 --- a/targets/grp/grp-chroot.sh +++ b/targets/grp/grp-chroot.sh @@ -3,7 +3,7 @@ source /tmp/chroot-functions.sh ## START BUILD -setup_portage +setup_pkgmgr unset DISTDIR diff --git a/targets/livecd-stage1/livecd-stage1-chroot.sh b/targets/livecd-stage1/livecd-stage1-chroot.sh index 5c6be014..f10de566 100755 --- a/targets/livecd-stage1/livecd-stage1-chroot.sh +++ b/targets/livecd-stage1/livecd-stage1-chroot.sh @@ -3,6 +3,6 @@ source /tmp/chroot-functions.sh ## START BUILD -setup_portage +setup_pkgmgr run_emerge "${clst_packages}" diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index e4f34474..a502e328 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -20,7 +20,7 @@ then fi ## START BUILD -clst_root_path=/ setup_portage +clst_root_path=/ setup_pkgmgr USE="-build" run_emerge "--oneshot --nodeps virtual/baselayout" diff --git a/targets/stage3/stage3-chroot.sh b/targets/stage3/stage3-chroot.sh index a09e1b6c..839d6f77 100755 --- a/targets/stage3/stage3-chroot.sh +++ b/targets/stage3/stage3-chroot.sh @@ -3,6 +3,6 @@ source /tmp/chroot-functions.sh ## START BUILD -setup_portage +setup_pkgmgr run_emerge "-e system" diff --git a/targets/stage4/stage4-chroot.sh b/targets/stage4/stage4-chroot.sh index 6622980e..d8c8b736 100755 --- a/targets/stage4/stage4-chroot.sh +++ b/targets/stage4/stage4-chroot.sh @@ -3,7 +3,7 @@ source /tmp/chroot-functions.sh ## START BUILD -setup_portage +setup_pkgmgr echo "Bringing system up to date using profile specific use flags" run_emerge -u system diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index e1c9bacf..8a614aa0 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -135,42 +135,42 @@ setup_myemergeopts(){ fi } -setup_portage(){ - # portage needs to be merged manually with USE="build" set to avoid frying - # our make.conf. emerge system could merge it otherwise. -# if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_portage ] -# then -# echo "Portage Autoresume point found not emerging portage" -# else - USE="build" run_emerge --oneshot --nodeps portage -# touch /tmp/.clst_portage || exit 1 -# fi -} - -setup_gcc(){ - if [ -x /usr/bin/gcc-config ] +setup_binutils(){ + if [ -x /usr/bin/binutils-config ] then - mythang=$( cd /etc/env.d/gcc; ls ${clst_CHOST}-* | head -n 1 ) + mythang=$( cd /etc/env.d/binutils; ls ${clst_CHOST}-* | head -n 1 ) if [ -z "${mythang}" ] then mythang=1 fi - gcc-config ${mythang}; update_env_settings + binutils-config ${mythang}; update_env_settings fi } -setup_binutils(){ - if [ -x /usr/bin/binutils-config ] +setup_gcc(){ + if [ -x /usr/bin/gcc-config ] then - mythang=$( cd /etc/env.d/binutils; ls ${clst_CHOST}-* | head -n 1 ) + mythang=$( cd /etc/env.d/gcc; ls ${clst_CHOST}-* | head -n 1 ) if [ -z "${mythang}" ] then mythang=1 fi - binutils-config ${mythang}; update_env_settings + gcc-config ${mythang}; update_env_settings fi } +setup_pkgmgr(){ + # portage needs to be merged manually with USE="build" set to avoid frying + # our make.conf. emerge system could merge it otherwise. +# if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_portage ] +# then +# echo "Portage Autoresume point found not emerging portage" +# else + USE="build" run_emerge --oneshot --nodeps virtual/portage +# touch /tmp/.clst_portage || exit 1 +# fi +} + cleanup_distcc() { rm -rf /etc/distcc/hosts for i in cc gcc c++ g++; do diff --git a/targets/tinderbox/tinderbox-chroot.sh b/targets/tinderbox/tinderbox-chroot.sh index fb281125..f7c1abaf 100755 --- a/targets/tinderbox/tinderbox-chroot.sh +++ b/targets/tinderbox/tinderbox-chroot.sh @@ -3,7 +3,7 @@ source /tmp/chroot-functions.sh # START THE BUILD -setup_portage +setup_pkgmgr # Backup pristine system -- 2.26.2