3 # We do this first, so we know our package list for --debug
4 export clst_buildpkgs="$(/tmp/build.py)"
6 source /tmp/chroot-functions.sh
8 # Setup our environment
9 STAGE1_USE="$(portageq envvar STAGE1_USE)"
10 FEATURES="${clst_myfeatures} nodoc noman noinfo"
12 ## Sanity check profile
13 if [ -z "${clst_buildpkgs}" ]
15 echo "Your profile seems to be broken."
16 echo "Could not build a list of build packages."
17 echo "Double check your /etc/make.profile link and the 'packages' files."
22 # First, we drop in a known-good baselayout
23 [ -e /etc/make.conf ] && \
24 echo 'USE="${USE} -build"' >> /etc/make.conf
25 run_merge "--oneshot --nodeps sys-apps/baselayout"
26 sed -i '/USE="${USE} -build"/d' /etc/make.conf
28 # Next, we install the package manager
29 clst_root_path=/ setup_pkgmgr
30 make_destpath /tmp/stage1root
32 # Now, we install our packages
33 [ -e /etc/make.conf ] && \
34 echo "USE=\"-* bindist build ${STAGE1_USE} ${clst_HOSTUSE}\"" \
36 run_merge "--noreplace --oneshot ${clst_buildpkgs}"
37 sed -i "/USE=\"-* bindist build ${STAGE1_USE} ${clst_HOSTUSE}\"/d" \