X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fporterbox%2Ffiles%2Fschroot-dsa%2Fconfig;h=ba94f6fedcd993614c178ec56745eb3b388256cf;hb=245ba7ea907401e38bda78fcd7a6cc0ef07101ef;hp=8ee7b635bb1b2bae5050d2c1813cda3c817ade8d;hpb=1af943401cb3dea6a550030e3c6ad3043c463e03;p=mirror%2Fdsa-puppet.git diff --git a/modules/porterbox/files/schroot-dsa/config b/modules/porterbox/files/schroot-dsa/config index 8ee7b635b..ba94f6fed 100644 --- a/modules/porterbox/files/schroot-dsa/config +++ b/modules/porterbox/files/schroot-dsa/config @@ -5,19 +5,35 @@ ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## -. "/etc/schroot/default/config" +FSTAB="/etc/schroot/dsa/fstab" +[ -e "$FSTAB" ] || FSTAB="/etc/schroot/default/fstab" + +COPYFILES="/etc/schroot/dsa/copyfiles" +[ -e "$COPYFILES" ] || COPYFILES="/etc/schroot/default/copyfiles" + +NSSDATABASES="/etc/schroot/dsa/nssdatabases" +[ -e "$NSSDATABASES" ] || NSSDATABASES="/etc/schroot/default/nssdatabases" + # added by weasel: if [ "$CHROOT_SESSION_PURGE" = "true" ]; then - case $CHROOT_NAME in - *-*_*-dchroot-*) - suitevariant_arch_tuple=${CHROOT_NAME%%-dchroot-*} + case $CHROOT_DESCRIPTION in + "["*-*_*-dchroot"]"*) + chroot_type="$CHROOT_DESCRIPTION"; chroot_type="${chroot_type#\[}"; chroot_type="${chroot_type%%]*}" + suitevariant_arch_tuple="${chroot_type%%-dchroot-*}" suitevariant=${suitevariant_arch_tuple%_*} SUITE_BASE=${suitevariant%-*} SUITE_VARIANT=${suitevariant##*-} ;; - *_*-dchroot-*) - SUITE_BASE=${CHROOT_NAME%%_*} + "["*_*-dchroot"]"*) + chroot_type="$CHROOT_DESCRIPTION"; chroot_type="${chroot_type#\[}"; chroot_type="${chroot_type%%]*}" + SUITE_BASE="${chroot_type%%_*}" + ;; + *) + if [ "$STAGE" = "setup-start" ]; then + echo >&2 "Unable to parse chroot description for what kind of chroot you want." + exit 1 + fi ;; esac fi @@ -28,3 +44,9 @@ if [ -e /etc/schroot/dsa/default-mirror ]; then MIRROR=$(cat /etc/schroot/dsa/default-mirror ) fi MIRROR=${MIRROR:-cdn.debian.net} + +if [ "$(basename "$0")" = "00check" ] && + [ "$CHROOT_TYPE" = "file" ] && + [ "$STAGE" = "setup-start" ]; then + echo "Untarring chroot environment. This might take a minute or two." +fi