[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Arch Linux: improve locking

Holger Levsen holger at layer-acht.org
Tue Dec 12 14:04:19 UTC 2017


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 80091e40d24900393a530bf72ec163b1cfb05c63
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue Dec 12 14:04:14 2017 +0000

    reproducible Arch Linux: improve locking
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_build_archlinux_pkg.sh | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 05cdd44..8b4f463 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -98,10 +98,15 @@ choose_package() {
 		echo "$(date -u ) - exiting cleanly now."
 		exit 0
 	fi
-	echo "$(date -u ) - building package $SRCPACKAGE from '$REPOSITORY' now..."
-	# very simple locking…
 	mkdir -p $BASE/archlinux/$REPOSITORY/$SRCPACKAGE
-	[ ! -f $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.needs_build ] || rm $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.needs_build
+	# very simple locking…
+	if [ -f $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.needs_build ] ; then
+		rm $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.needs_build
+	else
+		echo "$(date -u ) - $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.needs_build does not exist?!?"
+		exit 1
+	fi
+	echo "$(date -u ) - building package $SRCPACKAGE from '$REPOSITORY' now..."
 	# clear files from previous builds
 	# FIXME: while this is an improvement over the previous situation, where these files were kept forever
 	#        this is still bad, as now, during this build, some files are not accessable on the web anymore.

-- 
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