Changing run_emerge to run_merge, changing both setup_portage and setup_myfeatures...
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 28 Feb 2008 03:59:26 +0000 (03:59 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 28 Feb 2008 03:59:26 +0000 (03:59 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1333 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/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

index bd9a11a6e7a55b76078638478adad46d9bf14b97..f68aa944de42efdd8a2e3bcb366c7ca1c4bdf908 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,19 @@
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  28 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/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 <wolf31o2@gentoo.org>
   targets/grp/grp-chroot.sh, targets/livecd-stage1/livecd-stage1-chroot.sh,
   targets/stage1/stage1-chroot.sh, targets/stage3/stage3-chroot.sh,
index bdc1ddad8d3bf1064fa7a074f9712e4dc1c99ecc..89e834c5fb4337f5a5888069f9c301c31b322bf7 100755 (executable)
@@ -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}"
index d3465bae36b88a953e1d802511f5ed9c4f82a8c6..3ed29b6153baa7bf1104366e6b5deecf07d21f0e 100755 (executable)
@@ -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
index f10de566a2e8ce1d1973401b2ba5a1ff40ab5409..30bc47083a6d1863ebcecbe254e936aa27f5e1f3 100755 (executable)
@@ -5,4 +5,4 @@ source /tmp/chroot-functions.sh
 ## START BUILD
 setup_pkgmgr
 
-run_emerge "${clst_packages}"
+run_merge "${clst_packages}"
index 76e97aac6205d76d9a2d0424ce8cbb0acac29803..3115cac84f641819de86c21ebda541e446056e01 100755 (executable)
@@ -3,4 +3,4 @@
 source /tmp/chroot-functions.sh
 
 # START BUILD
-run_emerge "${clst_packages}"
+run_merge "${clst_packages}"
index 8d9898b325fe61adbd871f90b82db8dd92895da3..ad3916cd9283e32f2ce42f7331b1912f5fdf59ab 100644 (file)
@@ -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
index 44d1d00ea60608ad3cc82e555804bb909aae2f53..88c32e88fb6cdefcb9d213fc9377caa36c2046ac 100644 (file)
@@ -13,4 +13,4 @@ export FEATURES="${clst_myfeatures}"
 
 # START BUILD
 
-run_emerge ${clst_myemergeopts} ${clst_packages}
+run_merge ${clst_myemergeopts} ${clst_packages}
index a502e328394e55ebd494a6e7da929c4a34c0931c..1b7204f1617eaed020c5d04c1decabf46e08fa44 100755 (executable)
@@ -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}"
index 36c2a4572cad910ef137f12def5c46713f3f0cd6..ddc9b31f50b7d14c2b9c1174a3d0677ad24f51ad 100755 (executable)
@@ -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
index 839d6f779819fcb1d5da97bc1871013d44d51f3e..de46bcf60830e24ec19945ab76d50cfc8513a00b 100755 (executable)
@@ -5,4 +5,4 @@ source /tmp/chroot-functions.sh
 ## START BUILD
 setup_pkgmgr
 
-run_emerge "-e system"
+run_merge "-e system"
index 36c2a4572cad910ef137f12def5c46713f3f0cd6..ddc9b31f50b7d14c2b9c1174a3d0677ad24f51ad 100755 (executable)
@@ -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
index d8c8b736cee86d22f308d8143a9f608993065472..0c2611cff22476c361fb8f73063ecd5f3bcc7b16 100755 (executable)
@@ -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}"
index 8a614aa09b44970c150dc8c92abc21fe02cdcc04..809a4fcda0a55805a9e545286812ff475ced89a6 100755 (executable)
@@ -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}
index 1876feea010c27572675339cc71da7acfa2e96e4..9f21c9d330795776558459a7113f86dd233c43d2 100755 (executable)
@@ -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
index b5aec801d3d5949d248d1b0abbb3d320482a243c..9f1127356b236ec1c1e17451debf1015f0276715 100644 (file)
@@ -2,6 +2,6 @@
 
 source /tmp/chroot-functions.sh
 
-run_emerge -C ${clst_packages}
+run_merge -C ${clst_packages}
 
 exit 0
index f7c1abafaa910c2409e95cbcfe2c6c73dc3c114a..6bdaaaa0bf97fded4b2b2c6474d05619d05a5f6c 100755 (executable)
@@ -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