From 9d2bdd78a062c19dfd9072a1aa63f782425fbc92 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 18 Oct 2015 17:58:50 +0200 Subject: reproducible arch: cleanup schroot first --- bin/reproducible_build_arch_pkg.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh index bfe37502..ed458801 100755 --- a/bin/reproducible_build_arch_pkg.sh +++ b/bin/reproducible_build_arch_pkg.sh @@ -14,18 +14,18 @@ set -e cleanup_all() { cd - # delete main work dir (only on master) - if [ "$MODE" = "master" ] ; then - rm $TMPDIR -r - echo "$(date -u) - $TMPDIR deleted." + # delete session if it still exists + if [ "$MODE" != "master" ] ; then + schroot --end-session -c arch-$SRCPACKAGE-$(basename $TMPDIR) > /dev/null 2>&1 || true fi # delete makepkg build dir if [ ! -z $SRCPACKAGE ] && [ -d /tmp/$SRCPACKAGE-$(basename $TMPDIR) ] ; then rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR) fi - # delete session if it still exists - if [ "$MODE" != "master" ] ; then - schroot --end-session -c arch-$SRCPACKAGE-$(basename $TMPDIR) > /dev/null 2>&1 || true + # delete main work dir (only on master) + if [ "$MODE" = "master" ] ; then + rm $TMPDIR -r + echo "$(date -u) - $TMPDIR deleted." fi } -- cgit v1.2.3-54-g00ecf