From 1d418f2d14905b513deb0e3c0fae172d2b8ae08f Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Thu, 28 Feb 2008 03:59:26 +0000 Subject: [PATCH] Changing run_emerge to run_merge, changing both setup_portage and setup_myfeatures to add any USE changes to make.conf prior to merge, then removing the settings added, rather than (ab)using the environment. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1333 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 13 +++++++ targets/embedded/embedded-chroot.sh | 4 +- targets/grp/grp-chroot.sh | 4 +- targets/livecd-stage1/livecd-stage1-chroot.sh | 2 +- targets/netboot/netboot-chroot.sh | 2 +- targets/netboot/netboot-combine.sh | 2 +- targets/netboot2/netboot2-pkg.sh | 2 +- targets/stage1/stage1-chroot.sh | 4 +- targets/stage2/stage2-preclean-chroot.sh | 6 +-- targets/stage3/stage3-chroot.sh | 2 +- targets/stage3/stage3-preclean-chroot.sh | 6 +-- targets/stage4/stage4-chroot.sh | 4 +- targets/support/chroot-functions.sh | 38 +++++++------------ targets/support/pre-kmerge.sh | 4 +- targets/support/unmerge.sh | 2 +- targets/tinderbox/tinderbox-chroot.sh | 4 +- 16 files changed, 50 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd9a11a6..f68aa944 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,19 @@ # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 28 Feb 2008; Chris Gianelloni + targets/embedded/embedded-chroot.sh, targets/grp/grp-chroot.sh, + targets/livecd-stage1/livecd-stage1-chroot.sh, + targets/netboot/netboot-chroot.sh, targets/netboot/netboot-combine.sh, + targets/netboot2/netboot2-pkg.sh, targets/stage1/stage1-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/support/chroot-functions.sh, targets/support/pre-kmerge.sh, + targets/support/unmerge.sh, targets/tinderbox/tinderbox-chroot.sh: + Changing run_emerge to run_merge, changing both setup_portage and + setup_myfeatures to add any USE changes to make.conf prior to merge, then + removing the settings added, rather than (ab)using the environment. + 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, diff --git a/targets/embedded/embedded-chroot.sh b/targets/embedded/embedded-chroot.sh index bdc1ddad..89e834c5 100755 --- a/targets/embedded/embedded-chroot.sh +++ b/targets/embedded/embedded-chroot.sh @@ -7,9 +7,9 @@ export DESTROOT="${clst_root_path}" export clst_root_path="/" echo "Installing dependencies into ${DESTROOT}..." -run_emerge -o "${clst_embedded_packages}" +run_merge -o "${clst_embedded_packages}" export clst_root_path="${DESTROOT}" export INSTALL_MASK="${clst_install_mask}" -run_emerge -1 -O "${clst_embedded_packages}" +run_merge -1 -O "${clst_embedded_packages}" diff --git a/targets/grp/grp-chroot.sh b/targets/grp/grp-chroot.sh index d3465bae..3ed29b61 100755 --- a/targets/grp/grp-chroot.sh +++ b/targets/grp/grp-chroot.sh @@ -15,10 +15,10 @@ then unset DISTDIR export PKGDIR="/tmp/grp/${clst_grp_target}" - run_emerge --usepkg --buildpkg --noreplace --newuse ${clst_myemergeopts} \ + run_merge --usepkg --buildpkg --noreplace --newuse ${clst_myemergeopts} \ ${clst_grp_packages} || exit 1 else - DISTDIR="/tmp/grp/${clst_grp_target}" run_emerge --fetchonly \ + DISTDIR="/tmp/grp/${clst_grp_target}" run_merge --fetchonly \ ${clst_grp_packages} || exit 1 unset PKGDIR fi diff --git a/targets/livecd-stage1/livecd-stage1-chroot.sh b/targets/livecd-stage1/livecd-stage1-chroot.sh index f10de566..30bc4708 100755 --- a/targets/livecd-stage1/livecd-stage1-chroot.sh +++ b/targets/livecd-stage1/livecd-stage1-chroot.sh @@ -5,4 +5,4 @@ source /tmp/chroot-functions.sh ## START BUILD setup_pkgmgr -run_emerge "${clst_packages}" +run_merge "${clst_packages}" diff --git a/targets/netboot/netboot-chroot.sh b/targets/netboot/netboot-chroot.sh index 76e97aac..3115cac8 100755 --- a/targets/netboot/netboot-chroot.sh +++ b/targets/netboot/netboot-chroot.sh @@ -3,4 +3,4 @@ source /tmp/chroot-functions.sh # START BUILD -run_emerge "${clst_packages}" +run_merge "${clst_packages}" diff --git a/targets/netboot/netboot-combine.sh b/targets/netboot/netboot-combine.sh index 8d9898b3..ad3916cd 100644 --- a/targets/netboot/netboot-combine.sh +++ b/targets/netboot/netboot-combine.sh @@ -35,7 +35,7 @@ case ${clst_hostarch} in esac #if [ ! -z "${booter}" ] ; then -# run_emerge ${booter} || exit 1 +# run_merge ${booter} || exit 1 #fi extract_kernels ${clst_chroot_path}/tmp diff --git a/targets/netboot2/netboot2-pkg.sh b/targets/netboot2/netboot2-pkg.sh index 44d1d00e..88c32e88 100644 --- a/targets/netboot2/netboot2-pkg.sh +++ b/targets/netboot2/netboot2-pkg.sh @@ -13,4 +13,4 @@ export FEATURES="${clst_myfeatures}" # START BUILD -run_emerge ${clst_myemergeopts} ${clst_packages} +run_merge ${clst_myemergeopts} ${clst_packages} diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index a502e328..1b7204f1 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -22,6 +22,6 @@ fi ## START BUILD clst_root_path=/ setup_pkgmgr -USE="-build" run_emerge "--oneshot --nodeps virtual/baselayout" +USE="-build" run_merge "--oneshot --nodeps virtual/baselayout" -USE="-* bindist build ${STAGE1_USE} ${HOSTUSE}" run_emerge "--noreplace --oneshot --newuse ${clst_buildpkgs}" +USE="-* bindist build ${STAGE1_USE} ${HOSTUSE}" run_merge "--noreplace --oneshot --newuse ${clst_buildpkgs}" diff --git a/targets/stage2/stage2-preclean-chroot.sh b/targets/stage2/stage2-preclean-chroot.sh index 36c2a457..ddc9b31f 100755 --- a/targets/stage2/stage2-preclean-chroot.sh +++ b/targets/stage2/stage2-preclean-chroot.sh @@ -6,15 +6,15 @@ cleanup_stages if [ -n "${clst_CCACHE}" ] then - run_emerge -C dev-util/ccache || exit 1 + run_merge -C dev-util/ccache || exit 1 fi if [ -n "${clst_DISTCC}" ] then - run_emerge -C sys-devel/distcc || exit 1 + run_merge -C sys-devel/distcc || exit 1 fi if [ -n "${clst_ICECREAM}" ] then - run_emerge -C sys-devel/icecream || exit 1 + run_merge -C sys-devel/icecream || exit 1 fi diff --git a/targets/stage3/stage3-chroot.sh b/targets/stage3/stage3-chroot.sh index 839d6f77..de46bcf6 100755 --- a/targets/stage3/stage3-chroot.sh +++ b/targets/stage3/stage3-chroot.sh @@ -5,4 +5,4 @@ source /tmp/chroot-functions.sh ## START BUILD setup_pkgmgr -run_emerge "-e system" +run_merge "-e system" diff --git a/targets/stage3/stage3-preclean-chroot.sh b/targets/stage3/stage3-preclean-chroot.sh index 36c2a457..ddc9b31f 100755 --- a/targets/stage3/stage3-preclean-chroot.sh +++ b/targets/stage3/stage3-preclean-chroot.sh @@ -6,15 +6,15 @@ cleanup_stages if [ -n "${clst_CCACHE}" ] then - run_emerge -C dev-util/ccache || exit 1 + run_merge -C dev-util/ccache || exit 1 fi if [ -n "${clst_DISTCC}" ] then - run_emerge -C sys-devel/distcc || exit 1 + run_merge -C sys-devel/distcc || exit 1 fi if [ -n "${clst_ICECREAM}" ] then - run_emerge -C sys-devel/icecream || exit 1 + run_merge -C sys-devel/icecream || exit 1 fi diff --git a/targets/stage4/stage4-chroot.sh b/targets/stage4/stage4-chroot.sh index d8c8b736..0c2611cf 100755 --- a/targets/stage4/stage4-chroot.sh +++ b/targets/stage4/stage4-chroot.sh @@ -6,8 +6,8 @@ source /tmp/chroot-functions.sh setup_pkgmgr echo "Bringing system up to date using profile specific use flags" -run_emerge -u system +run_merge -u system echo "Emerging packages using stage4 use flags" -run_emerge "${clst_packages}" +run_merge "${clst_packages}" diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index 8a614aa0..809a4fcd 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -64,26 +64,17 @@ setup_myfeatures(){ if [ -n "${clst_CCACHE}" ] then export clst_myfeatures="${clst_myfeatures} ccache" - #if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_ccache ] - #then - # echo "CCACHE Autoresume point found not emerging ccache" - #else - clst_root_path=/ run_emerge --oneshot --nodeps ccache || exit 1 - # touch /tmp/.clst_ccache - #fi + clst_root_path=/ run_merge --oneshot --nodeps dev-util/ccache || exit 1 fi if [ -n "${clst_DISTCC}" ] then export clst_myfeatures="${clst_myfeatures} distcc" export DISTCC_HOSTS="${clst_distcc_hosts}" - #if [ "${clst_AUTORESUME}" = "1" -a -e /tmp/.clst_distcc ] - #then - # echo "DISTCC Autoresume point found not emerging distcc" - #else - USE="-gtk -gnome" clst_root_path=/ run_emerge --oneshot --nodeps distcc || exit 1 - #touch /tmp/.clst_distcc - #fi + [ -e /etc/make.conf ] && \ + echo 'USE="${USE} -avahi -gtk -gnome' >> /etc/make.conf + clst_root_path=/ run_merge --oneshot --nodeps sys-devel/distcc || exit 1 + sed -i '/USE="${USE} -avahi -gtk -gnome/d' /etc/make.conf mkdir -p /etc/distcc echo "${clst_distcc_hosts}" > /etc/distcc/hosts @@ -100,7 +91,7 @@ setup_myfeatures(){ if [ -n "${clst_ICECREAM}" ] then - clst_root_path=/ run_emerge --oneshot --nodeps sys-devel/icecream || exit 1 + clst_root_path=/ run_merge --oneshot --nodeps sys-devel/icecream || exit 1 # This sets up automatic cross-icecc-fu according to # http://gentoo-wiki.com/HOWTO_Setup_An_ICECREAM_Compile_Cluster#Icecream_and_cross-compiling @@ -160,15 +151,12 @@ setup_gcc(){ } 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 + # We need to merge our package manager with USE="build" set in case it is + # portage to avoid frying our /etc/make.conf file. Otherwise, we could + # just let emerge system could merge it. + [ -e /etc/make.conf ] && echo 'USE="${USE} build' >> /etc/make.conf + run_merge --oneshot --nodeps virtual/portage + sed -i '/USE="${USE} build/d' /etc/make.conf } cleanup_distcc() { @@ -237,7 +225,7 @@ make_destpath() { fi } -run_emerge() { +run_merge() { # Sets up the ROOT= parameter # with no options ROOT=/ make_destpath ${clst_root_path} diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh index 1876feea..9f21c9d3 100755 --- a/targets/support/pre-kmerge.sh +++ b/targets/support/pre-kmerge.sh @@ -2,7 +2,7 @@ source /tmp/chroot-functions.sh -run_emerge --oneshot genkernel +run_merge --oneshot genkernel install -d /tmp/kerncache case ${clst_target} in @@ -11,7 +11,7 @@ case ${clst_target} in ;; netboot2) - run_emerge --oneshot genkernel + run_merge --oneshot genkernel install -d /tmp/kerncache # Set the netboot builddate/hostname in linuxrc and copy to proper arch diff --git a/targets/support/unmerge.sh b/targets/support/unmerge.sh index b5aec801..9f112735 100644 --- a/targets/support/unmerge.sh +++ b/targets/support/unmerge.sh @@ -2,6 +2,6 @@ source /tmp/chroot-functions.sh -run_emerge -C ${clst_packages} +run_merge -C ${clst_packages} exit 0 diff --git a/targets/tinderbox/tinderbox-chroot.sh b/targets/tinderbox/tinderbox-chroot.sh index f7c1abaf..6bdaaaa0 100755 --- a/targets/tinderbox/tinderbox-chroot.sh +++ b/targets/tinderbox/tinderbox-chroot.sh @@ -14,7 +14,7 @@ for x in ${clst_tinderbox_packages} do if [ -n "${clst_VERBOSE}" ] then - run_emerge --usepkg --buildpkg --newuse -vp $x + run_merge --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 ] @@ -26,7 +26,7 @@ do mkdir -p /tmp/packages/$x export PORT_LOGDIR="/tmp/packages/$x" - run_emerge $x + run_merge $x if [ "$?" != "0" ] then -- 2.26.2