3 source /tmp/chroot-functions.sh
5 # We do this first, so we know our package list for --debug
6 export clst_buildpkgs="$(/tmp/build.py)"
8 # Setup our environment
9 BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)"
10 [ -n "${clst_BINDIST}" ] && BOOTSTRAP_USE="${BOOTSTRAP_USE} bindist"
12 FEATURES="${clst_myfeatures} nodoc noman noinfo -news"
14 ## Sanity check profile
15 if [ -z "${clst_buildpkgs}" ]
17 echo "Your profile seems to be broken."
18 echo "Could not build a list of build packages."
19 echo "Double check your ${clst_port_conf}/make.profile link and the 'packages' files."
23 ## Setup seed pkgmgr to ensure latest
24 clst_root_path=/ setup_pkgmgr
27 if [ -n "${clst_update_seed}" ]; then
28 if [ "${clst_update_seed}" == "yes" ]; then
29 echo "Updating seed stage..."
30 if [ -n "${clst_update_seed_command}" ]; then
31 clst_root_path=/ run_merge "--buildpkg=n ${clst_update_seed_command}"
33 clst_root_path=/ run_merge "--buildpkg=n --update --deep --newuse --onlydeps gcc"
35 elif [ "${clst_update_seed}" != "no" ]; then
36 echo "Invalid setting for update_seed: ${clst_update_seed}"
40 echo "Skipping seed stage update..."
43 make_destpath /tmp/stage1root
46 # First, we drop in a known-good baselayout
47 [ -e ${clst_make_conf} ] && \
48 echo 'USE="${USE} -build"' >> ${clst_make_conf}
49 run_merge "--oneshot --nodeps sys-apps/baselayout"
51 sed -i '/USE="${USE} -build"/d' ${clst_make_conf}
53 # Now, we install our packages
54 [ -e ${clst_make_conf} ] && \
55 echo "USE=\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" \
57 run_merge "--oneshot ${clst_buildpkgs}"
58 sed -i "/USE=\"-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"/d" \