[Qa-jenkins-scm] [jenkins.debian.net] 01/12: reproducible: build: refactor: slim down the call_debbindiff() function: strip out init_debbindiff() where we check for locks

Holger Levsen holger at moszumanska.debian.org
Sat Apr 18 15:44:56 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 63a2d41c77ab8a0f1f4f338bd54a4e418cf5f482
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Mon Apr 6 14:48:15 2015 +0200

    reproducible: build: refactor: slim down the call_debbindiff() function: strip out init_debbindiff() where we check for locks
---
 bin/reproducible_build.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 94c66b2..16ad799 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -81,10 +81,10 @@ print_out_duration() {
 	echo "$(date) - total duration: ${HOUR}h ${MIN}m ${SEC}s." | tee -a ${RBUILDLOG}
 }
 
-call_debbindiff() {
+init_debbindiff() {
 	# the schroot for debbindiff gets updated once a day. wait patiently if that's the case
 	if [ -f $DBDCHROOT_WRITELOCK ] || [ -f $DBDCHROOT_READLOCK ] ; then
-		for i in $(seq 0 200) ; do	# this loop also exists in _common.sh and _setup_pbuilder.sh
+		for i in $(seq 0 200) ; do	# this loop also exists in _common.sh and _setup_schroot.sh
 			sleep 15
 			echo "sleeping 15s, debbindiff schroot is locked."
 			if [ ! -f $DBDCHROOT_WRITELOCK ] && [ ! -f $DBDCHROOT_READLOCK ] ; then
@@ -100,6 +100,10 @@ call_debbindiff() {
 		# write locks are only done by the schroot setup job
 		touch $DBDCHROOT_READLOCK
 	fi
+}
+
+call_debbindiff() {
+	init_debbindiff
 	echo | tee -a ${RBUILDLOG}
 	TIMEOUT="30m"	# don't forget to also change the "seq 0 200" loop 17 lines above
 	DBDVERSION="$(schroot --directory /tmp -c source:jenkins-reproducible-unstable-debbindiff debbindiff -- --version 2>&1)"

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