5 if [ -n "${clst_ENVSCRIPT}" ]
12 #emerge and enable ccache before we set ROOT
13 if [ -n "${clst_CCACHE}" ]
15 export FEATURES="ccache"
16 emerge --oneshot --nodeps ccache || exit 1
18 if [ -n "${clst_DISTCC}" ]
20 export FEATURES="distcc"
21 export DISTCC_HOSTS="${clst_distcc_hosts}"
22 USE="-gtk -gnome" emerge --oneshot --nodeps distcc || exit 1
23 echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd
24 /usr/bin/distcc-config --install 2>&1 > /dev/null
25 /usr/bin/distccd 2>&1 > /dev/null
29 if [ -n "${clst_PKGCACHE}" ]
31 export EMERGE_OPTS="--usepkg --buildpkg"
33 for x in $(/tmp/build.sh)
35 echo $x >> /tmp/build.log
36 USE="-* build" emerge ${EMERGE_OPTS} --noreplace $x || exit 1
41 #normal chroot is fine here since this is our second chroot (no $clst_CHROOT needed)
42 chroot ${2} /bin/bash << EOF
43 #now, some finishing touches to initialize gcc-config....
45 if [ -e /usr/sbin/gcc-config ]
47 mythang=\$( cd /etc/env.d/gcc; ls ${clst_CHOST}-* )
48 gcc-config \${mythang}; env-update; source /etc/profile
50 #stage1 is not going to have anything in zoneinfo, so save our Factory timezone
52 cp /usr/share/zoneinfo/Factory /etc/localtime