summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-16 17:06:52 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-16 17:06:52 +0200
commitad91f92fda3fb7f4b39d5c90337688bfa8f1e6bc (patch)
treecfbe8a5fc42d9e3e8c608f643abd81d9dff2cf45 /bin
parentf19c6ee0a7d9e55e8228b596babe3c7a45dd99d0 (diff)
downloadjenkins.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-xbin/reproducible_build_arch_pkg.sh19
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
}