diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-10-16 17:06:52 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-10-16 17:06:52 +0200 |
commit | ad91f92fda3fb7f4b39d5c90337688bfa8f1e6bc (patch) | |
tree | cfbe8a5fc42d9e3e8c608f643abd81d9dff2cf45 /bin | |
parent | f19c6ee0a7d9e55e8228b596babe3c7a45dd99d0 (diff) | |
download | jenkins.debian.net-ad91f92fda3fb7f4b39d5c90337688bfa8f1e6bc.tar.xz |
reproducible arch: prefix schroot session names with 'arch-' and clean them up properly on failures
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build_arch_pkg.sh | 19 |
1 files changed, 11 insertions, 8 deletions
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 } |