From 63a2d41c77ab8a0f1f4f338bd54a4e418cf5f482 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 6 Apr 2015 14:48:15 +0200 Subject: 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(-) (limited to 'bin') diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 94c66b29..16ad7996 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)" -- cgit v1.2.3-70-g09d2