# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Id: $
+ 21 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+ targets/stage1/stage1-chroot.sh, targets/stage2/stage2-chroot.sh,
+ targets/support/chroot-functions.sh:
+ Moved creating of stage1 package list to the beginning of stage1-chroot.sh
+ so we can get the output with --debug, added --newuse to the options for
+ stage1, as we should always rebuild any package where the USE has changed,
+ removed removal of portage logs from stage2-chroot.sh since it is being done
+ by cleanup_stages, moved world removal in cleanup_stages into a check for
+ stages 1 through 3, made update_env_settings check for the existence of
+ env-update before running it since we now run update_env_settings by default
+ everywhere chroot-functions.sh is sourced, and added a section to show_debug
+ to list the packages, since we don't yet force-enable verbose with debug.
+
20 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
modules/catalyst_lock.py:
Since my python sucks and I don't feel like troubleshooting it at the
#!/bin/bash
+# We do this first, so we know our package list for --debug
+export clst_buildpkgs="$(/tmp/build.py)"
+
source /tmp/chroot-functions.sh
# Setup our environment
-export clst_buildpkgs="$(/tmp/build.py)"
export STAGE1_USE="$(portageq envvar STAGE1_USE)"
export USE="-* bindist build ${STAGE1_USE}"
export FEATURES="${clst_myfeatures} nodoc noman noinfo"
USE="-build" run_emerge "--oneshot --nodeps virtual/baselayout"
-USE="-* bindist build ${STAGE1_USE} ${HOSTUSE}" run_emerge "--noreplace --oneshot ${clst_buildpkgs}"
+USE="-* bindist build ${STAGE1_USE} ${HOSTUSE}" run_emerge "--noreplace --oneshot --newuse ${clst_buildpkgs}"
## START BUILD
/usr/portage/scripts/bootstrap.sh ${bootstrap_opts} || exit 1
-rm -f /var/log/emerge.log /var/log/portage/elog/*
then
cleanup_icecream
fi
- rm -f /var/lib/portage/world
- touch /var/lib/portage/world
+ case ${clst_target} in
+ stage1|stage2|stage3)
+ rm -f /var/lib/portage/world
+ touch /var/lib/portage/world
+ ;;
+ *)
+ echo "Skipping removal of world file for ${clst_target}"
+ ;;
+ esac
rm -f /var/log/emerge.log /var/log/portage/elog/*
rm -rf /var/tmp/*
}
update_env_settings(){
- /usr/sbin/env-update
+ which env-update > /dev/null 2>&1
+ ret=$?
+ if [ $ret -eq 0 ]
+ then
+ ENV_UPDATE=`which env-update`
+ ${ENV_UPDATE}
+ else
+ echo "WARNING: env-update not found, skipping!"
+ fi
source /etc/profile
[ -f /tmp/envscript ] && source /tmp/envscript
}
show_debug() {
if [ "${clst_DEBUG}" = "1" ]
then
+ unset PACKAGES
echo "DEBUG:"
+ echo "Profile/target info:"
echo "Profile inheritance:"
python -c 'import portage; print portage.settings.profiles'
echo
echo "KERNEL_ABI: $(portageq envvar KERNEL_ABI)"
echo "MULTILIB_ABIS: $(portageq envvar MULTILIB_ABIS)"
echo
+ ### XXX: This is temporary until we make --debug force-enable --verbose
+ if [ -n "${clst_buildpkgs}" ]
+ then
+ PACKAGES=${clst_buildpkgs}
+ elif [ -n "${clst_packages}" ]
+ then
+ PACKAGES=${clst_packages}
+ fi
+ if [ -n "${PACKAGES}" ]
+ then
+ echo "Packages:"
+ echo "${PACKAGES}"
+ echo
+ fi
+ ### XXX: end of section to remove
fi
}