# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Id: $
+ 20 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/netboot2/netboot2-pkg.sh,
+ targets/stage1/stage1-chroot.sh, targets/stage2/stage2-chroot.sh,
+ targets/stage3/stage3-chroot.sh, targets/stage4/stage4-chroot.sh,
+ targets/support/chroot-functions.sh, targets/support/pre-kmerge.sh:
+ Clean up the debug code that I've added to stage1, move it to
+ chroot_functions.sh, and call it from all of our main targets.
+
14 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
modules/generic_stage_target.py:
Wow. I need to make sure that we actually comment comments in make.conf or
setup_myfeatures
+show_debug
+
# Setup the environment
export DESTROOT="${clst_root_path}"
export clst_root_path="/"
update_env_settings
-[ -f /tmp/envscript ] && source /tmp/envscript
-
setup_myfeatures
+show_debug
+
## START BUILD
setup_portage
setup_myfeatures
+show_debug
+
## START BUILD
setup_portage
setup_myfeatures
+show_debug
+
# START BUILD
run_emerge "${clst_packages}"
setup_myfeatures
+show_debug
+
# Setup our environment
export FEATURES="${clst_myfeatures}"
setup_myfeatures
+show_debug
+
# Setup our environment
export clst_buildpkgs="$(/tmp/build.py)"
export STAGE1_USE="$(portageq envvar STAGE1_USE)"
exit 1
fi
-if [ "${clst_DEBUG}" = "1" ]
-then
- echo "DEBUG:"
- echo "Profile inheritance:"
- python -c 'import portage; print portage.settings.profiles'
- echo "STAGE1_USE: $(portageq envvar STAGE1_USE)"
- echo "USE (profile): $(portageq envvar USE)"
- echo "USE (stage1): ${USE}"
- echo "FEATURES (profile): $(portageq envvar FEATURES)"
- echo "FEATURES (stage1): ${FEATURES}"
-
- exit 1
-fi
-
## START BUILD
clst_root_path=/ setup_portage
setup_myfeatures
+show_debug
+
# Setup the environment
export FEATURES="${clst_myfeatures} nodoc noman noinfo"
setup_myfeatures
-## START BUILD
-# We need portage to be merged manually with USE="build" set to avoid frying
-# our make.conf, otherwise, the system target could take care of it.
+show_debug
setup_portage
+## START BUILD
+
run_emerge "-e system"
rm -f /var/lib/portage/world
setup_myfeatures
+show_debug
+
## START BUILD
setup_portage
}
setup_myemergeopts(){
- if [ -n "${clst_VERBOSE}" ]
+ if [ -n "${clst_VERBOSE}" ] || [ -n "${clst_DEBUG}" ]
then
clst_myemergeopts="--verbose"
else
cp -vfdp ${1} ${clst_root_path}/${1}
if [[ -n $(type -p realpath) ]]; then
- TARGET=`realpath ${1}`
+ TARGET=`realpath ${1}`
else
- TARGET=`readlink -f ${1}`
+ TARGET=`readlink -f ${1}`
fi
if [ -h ${TARGET} ]
then
Comment=This is a link to the local copy of the Gentoo Linux Handbook.
Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop
}
+
+show_debug() {
+ if [ "${clst_DEBUG}" = "1" ]
+ then
+ echo "DEBUG:"
+ echo "Profile inheritance:"
+ python -c 'import portage; print portage.settings.profiles'
+ echo
+ echo "STAGE1_USE: $(portageq envvar STAGE1_USE)"
+ echo
+ echo "USE (profile): $(portageq envvar USE)"
+ echo "USE (stage1): ${USE}"
+ echo "FEATURES (profile): $(portageq envvar FEATURES)"
+ echo "FEATURES (stage1): ${FEATURES}"
+ echo
+ echo "ARCH: $(portageq envvar ARCH)"
+ echo "CHOST: $(portageq envvar CHOST)"
+ echo "CFLAGS: $(portageq envvar CFLAGS)"
+ echo
+ echo "PROFILE_ARCH: $(portageq envvar PROFILE_ARCH)"
+ echo
+ echo "ABI: $(portageq envvar ABI)"
+ echo "DEFAULT_ABI: $(portageq envvar DEFAULT_ABI)"
+ echo "KERNEL_ABI: $(portageq envvar KERNEL_ABI)"
+ echo "MULTILIB_ABIS: $(portageq envvar MULTILIB_ABIS)"
+ echo
+ fi
+}
update_env_settings
+setup_myfeatures
+
+show_debug
+
if [ -n "${clst_FETCH}" ]
then
export clst_myemergeopts="${clst_myemergeopts} -f"
case ${clst_target} in
livecd*|stage4)
- export USE="livecd"
run_emerge --oneshot genkernel
install -d /tmp/kerncache