@@ -39,6 +39,7 @@ SEEDFILE_BASE="/var/tmp/catalyst/builds"
3939ARCH=$( get_from_spec " subarch" )
4040PREFIX=$( get_from_spec source_subpath | cut -d ' /' -f1)
4141FLAVOUR=$( get_from_spec profile | cut -d ' :' -f1 || " gentoo" )
42+ STAGE=$( get_from_spec target)
4243SNAPSHOT_FILE=" $SNAPSHOT_BASE /$FLAVOUR -$TIMESTAMP .tar.bz2"
4344BASEURL=" https://bouncer.gentoo.org/fetch/root/all/releases/$ARCH /autobuilds"
4445
@@ -74,12 +75,20 @@ eval "mount -t overlay overlay -o lowerdir=\"$DEFAULT_REPO_DIR\",upperdir=\"$MOU
7475
7576einfo " Portage overlay is located at $MOUNT_OVERLAY "
7677
78+ einfo " Creating catalystrc file"
79+ cp -rf " $THIS_OVERLAY_DIR /assets/config/catalystrc.base" " $CONFTEMP /catalystrc" || exit 1
80+
81+ if [ " $STAGE " == " stage2" ]; then
82+ cat " $THIS_OVERLAY_DIR /assets/config/catalystrc.stage2" >> " $CONFTEMP /catalystrc"
83+ fi
84+
7785# at this point is safe to assume that there's no external catalyst config
7886# available, so stick to the bundled one
7987if [ -z " $CATALYST " ]; then
8088 einfo " Tweaking catalyst config to use just created portage overlay"
8189 cp -f " $THIS_OVERLAY_DIR /assets/config/catalyst.conf" " $CONFTEMP /catalyst.conf" || exit 1
8290 sed -i " s:@PORTDIR@:$MOUNT_OVERLAY :g" " $CONFTEMP /catalyst.conf" || exit 1
91+ sed -i " s:@ENVSCRIPT@:$CONFTEMP /catalystrc:g" " $CONFTEMP /catalyst.conf" || exit 1
8392 CATALYST=" $CONFTEMP /catalyst.conf"
8493fi
8594
91100
92101# check for snapshot
93102if [ ! -f " $SNAPSHOT_FILE " ]; then
103+ echo " Missing snapshot: $SNAPSHOT_FILE "
94104 einfo " Getting current snapshot..."
95105
96106 CMD=" catalyst -s $TIMESTAMP "
0 commit comments