# 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,
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}"
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
## START BUILD
setup_pkgmgr
-run_emerge "${clst_packages}"
+run_merge "${clst_packages}"
source /tmp/chroot-functions.sh
# START BUILD
-run_emerge "${clst_packages}"
+run_merge "${clst_packages}"
esac
#if [ ! -z "${booter}" ] ; then
-# run_emerge ${booter} || exit 1
+# run_merge ${booter} || exit 1
#fi
extract_kernels ${clst_chroot_path}/tmp
# START BUILD
-run_emerge ${clst_myemergeopts} ${clst_packages}
+run_merge ${clst_myemergeopts} ${clst_packages}
## 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}"
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
## START BUILD
setup_pkgmgr
-run_emerge "-e system"
+run_merge "-e system"
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
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}"
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
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
}
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() {
fi
}
-run_emerge() {
+run_merge() {
# Sets up the ROOT= parameter
# with no options ROOT=/
make_destpath ${clst_root_path}
source /tmp/chroot-functions.sh
-run_emerge --oneshot genkernel
+run_merge --oneshot genkernel
install -d /tmp/kerncache
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
source /tmp/chroot-functions.sh
-run_emerge -C ${clst_packages}
+run_merge -C ${clst_packages}
exit 0
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 ]
mkdir -p /tmp/packages/$x
export PORT_LOGDIR="/tmp/packages/$x"
- run_emerge $x
+ run_merge $x
if [ "$?" != "0" ]
then