[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: build: do not try to delete the lockfile if it's not ours
Holger Levsen
holger at moszumanska.debian.org
Sun Apr 19 13:22:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 689c42873048642fcdd5c0d4794b0c504a2ce083
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Sun Apr 19 15:19:15 2015 +0200
reproducible: build: do not try to delete the lockfile if it's not ours
---
bin/reproducible_build.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 1182f52..3c016cd 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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list