From ad91f92fda3fb7f4b39d5c90337688bfa8f1e6bc Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 16 Oct 2015 17:06:52 +0200 Subject: reproducible arch: prefix schroot session names with 'arch-' and clean them up properly on failures --- bin/reproducible_build_arch_pkg.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh index fe3f3cbf..12763d49 100755 --- a/bin/reproducible_build_arch_pkg.sh +++ b/bin/reproducible_build_arch_pkg.sh @@ -13,6 +13,9 @@ cleanup_all() { cd rm $TMPDIR -r echo "$(date -u) - $TMPDIR deleted." + if [ "$MODE" != "master" ] ; + schroot --end-session -c arch-$SRCPACKAGE + fi } handle_remote_error() { @@ -31,10 +34,10 @@ first_build() { echo "Date UTC: $(date -u)" echo "=============================================================================" set -x - schroot --begin-session --session-name=$SRCPACKAGE -c jenkins-reproducible-arch - schroot --run-session -c $SRCPACKAGE --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp - schroot --run-session -c $SRCPACKAGE --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck - schroot --end-session -c $SRCPACKAGE + schroot --begin-session --session-name=arch-$SRCPACKAGE -c jenkins-reproducible-arch + schroot --run-session -c arch-$SRCPACKAGE --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp + schroot --run-session -c arch-$SRCPACKAGE --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck + schroot --end-session -c arch-$SRCPACKAGE if ! "$DEBUG" ; then set +x ; fi } @@ -45,10 +48,10 @@ second_build() { echo "Date UTC: $(date -u)" echo "=============================================================================" set -x - schroot --begin-session --session-name=$SRCPACKAGE -c jenkins-reproducible-arch - schroot --run-session -c $SRCPACKAGE --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp - schroot --run-session -c $SRCPACKAGE --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck - schroot --end-session -c $SRCPACKAGE + schroot --begin-session --session-name=arch-$SRCPACKAGE -c jenkins-reproducible-arch + schroot --run-session -c arch-$SRCPACKAGE --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp + schroot --run-session -c arch-$SRCPACKAGE --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck + schroot --end-session -c arch-$SRCPACKAGE if ! "$DEBUG" ; then set +x ; fi } -- cgit v1.2.3-70-g09d2