b5326eef879b852de68445e922f22e442d3551c8
[catalyst.git] / targets / stage1 / stage1-chroot.sh
1 #!/bin/bash
2
3 . /tmp/chroot-functions.sh
4
5 update_env_settings
6
7 setup_myfeatures
8 setup_myemergeopts
9
10 # Setup our environment
11 export clst_buildpkgs="$(/tmp/build.py)"
12 export STAGE1_USE="$(portageq envvar STAGE1_USE)"
13 export USE="-* build ${STAGE1_USE}"
14 export FEATURES="${clst_myfeatures} nodoc noman noinfo"
15
16 ## Sanity check profile
17 if [ -z "${clst_buildpkgs}" ]
18 then
19         echo "Your profile seems to be broken."
20         echo "Could not build a list of build packages."
21         echo "Double check your /etc/make.profile link and the 'packages' files."
22         exit 1
23 fi
24
25 ## START BUILD
26 run_emerge "--noreplace --oneshot ${clst_buildpkgs}"
27 rm -f /var/lib/portage/world
28 touch /var/lib/portage/world
29
30 rm -f /var/log/emerge.log