]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/porterbox/files/schroot-dsa/config
pass dchroot type in description
[dsa-puppet.git] / modules / porterbox / files / schroot-dsa / config
1 # Settings for "dsa" profile.
2
3 ##
4 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
5 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
6 ##
7
8 . "/etc/schroot/default/config"
9
10 # added by weasel:
11 if [ "$CHROOT_SESSION_PURGE" = "true" ]; then
12     case $CHROOT_DESCRIPTION in
13         "["*-*_*-dchroot"]"*)
14             chroot_type="$CHROOT_DESCRIPTION"; chroot_type="${chroot_type#[}"; chroot_type="${chroot_type%%]*}"
15             suitevariant_arch_tuple="${chroot_type%%-dchroot-*}"
16             suitevariant=${suitevariant_arch_tuple%_*}
17             SUITE_BASE=${suitevariant%-*}
18             SUITE_VARIANT=${suitevariant##*-}
19         ;;
20         "["*_*-dchroot"]"*)
21             chroot_type="$CHROOT_DESCRIPTION"; chroot_type="${chroot_type#[}"; chroot_type="${chroot_type%%]*}"
22             SUITE_BASE="${chroot_type%%_*}"
23         ;;
24         *)
25             echo >&2 "Unable to parse chroot description for what kind of chroot you want."
26             exit 1
27         ;;
28     esac
29 fi
30
31 CHROOT_FILE_UNPACK_DIR=/srv/chroot/schroot-unpack
32
33 if [ -e /etc/schroot/dsa/default-mirror ]; then
34     MIRROR=$(cat /etc/schroot/dsa/default-mirror )
35 fi
36 MIRROR=${MIRROR:-cdn.debian.net}
37
38 if [ "$(basename "$0")" = "00check" ] &&
39    [ "$CHROOT_TYPE" = "file" ] &&
40    [ "$STAGE" = "setup-start" ]; then
41         echo "Untarring chroot environment.  This might take a minute or two."
42 fi