Re: Reducing chroot count to 4 -- using aliases
Moin!
Was faster than expected. The diff below is 1:1 running on fano right
now. It allows correct SUITE_VARIANT detection on !linux and does the
alias thing.
Christoph
--- 99builddsourceslist~ 2013-08-15 10:13:20.000000000 +0000
+++ 99builddsourceslist 2013-08-15 10:58:10.000000000 +0000
@@ -27,17 +27,23 @@
. "$SETUP_DATA_DIR/common-config"
if [ "$CHROOT_SESSION_PURGE" = "true" ]; then
- case $CHROOT_NAME in
- *-*-*-*-sbuild*)
- SUITE_BASE=$(echo $CHROOT_NAME | cut -f1 -d-)
- SUITE_VARIANT=$(echo $CHROOT_NAME | cut -f2,3 -d-)
+ if [ "LINUX" != "`uname`" ]; then
+ tail='*-*-sbuild*'
+ else
+ tail='*-sbuild*'
+ fi
+
+ case $CHROOT_ALIAS in
+ *-*-*-$tail)
+ SUITE_BASE=$(echo $CHROOT_ALIAS | cut -f1 -d-)
+ SUITE_VARIANT=$(echo $CHROOT_ALIAS | cut -f2,3 -d-)
;;
- *-*-*-sbuild*)
- SUITE_BASE=$(echo $CHROOT_NAME | cut -f1 -d-)
- SUITE_VARIANT=$(echo $CHROOT_NAME | cut -f2 -d-)
+ *-*-$tail)
+ SUITE_BASE=$(echo $CHROOT_ALIAS | cut -f1 -d-)
+ SUITE_VARIANT=$(echo $CHROOT_ALIAS | cut -f2 -d-)
;;
- *-*-sbuild*)
- SUITE_BASE=$(echo $CHROOT_NAME | cut -f1 -d-)
+ *-$tail)
+ SUITE_BASE=$(echo $CHROOT_ALIAS | cut -f1 -d-)
if [ ${SUITE_BASE} != "sid" ]; then
SUITE_VARIANT="proposed-updates"
fi
Reply to: