#!/bin/bash
-. /tmp/chroot-functions.sh
-
-update_env_settings
+# We do this first, so we know our package list for --debug
+export clst_buildpkgs="$(/tmp/build.py)"
-setup_myfeatures
-setup_myemergeopts
+source /tmp/chroot-functions.sh
# Setup our environment
-export clst_buildpkgs="$(/tmp/build.py)"
export STAGE1_USE="$(portageq envvar STAGE1_USE)"
-export USE="-* build ${STAGE1_USE}"
+export USE="-* bindist build ${STAGE1_USE}"
export FEATURES="${clst_myfeatures} nodoc noman noinfo"
## Sanity check profile
## START BUILD
clst_root_path=/ setup_portage
-run_emerge "--noreplace --oneshot ${clst_buildpkgs}"
-rm -f /var/lib/portage/world
-touch /var/lib/portage/world
+USE="-build" run_emerge "--oneshot --nodeps virtual/baselayout"
-rm -f /var/log/emerge.log
+USE="-* bindist build ${STAGE1_USE} ${HOSTUSE}" run_emerge "--noreplace --oneshot --newuse ${clst_buildpkgs}"