summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-19 15:19:15 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-19 15:22:23 +0200
commit689c42873048642fcdd5c0d4794b0c504a2ce083 (patch)
tree74d77f443d7e8ca825363482494752f4c839a6f9 /bin
parent96bd396d63dff8d04cfe3f991b42d879a5d644aa (diff)
downloadjenkins.debian.net-689c42873048642fcdd5c0d4794b0c504a2ce083.tar.xz
reproducible: build: do not try to delete the lockfile if it's not ours
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 1182f524..3c016cd2 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -54,6 +54,7 @@ handle_race_condition() {
check_for_race_conditions() {
if [ $$ -ne $(cat "$LOCKFILE") ] ; then
+ BAD_LOCKFILE=true
handle_race_condition lockfile
fi
}
@@ -91,7 +92,7 @@ cleanup_all() {
irc_message "Check $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log to find out why no artifacts were saved."
fi
rm -r $TMPDIR
- rm $LOCKFILE || true
+ if ! $BAD_LOCKFILE ; then rm -f $LOCKFILE ; fi
}
cleanup_userContent() {
@@ -420,6 +421,7 @@ cd $TMPDIR
DATE=$(date +'%Y-%m-%d %H:%M')
START=$(date +'%s')
RBUILDLOG=$(mktemp --tmpdir=$TMPDIR)
+BAD_LOCKFILE=false
choose_package # defines SUITE, PKGID, SRCPACKAGE, SCHEDULED_DATE, SAVE_ARTIFACTS