summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_common.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-09-20 14:35:32 +0200
committerHolger Levsen <holger@layer-acht.org>2015-09-20 14:57:19 +0200
commitf6a925687705ff3f8dab9726100c4af65cfadeb5 (patch)
tree67d523147820dbe849c2149d891e9220c260bdae /bin/reproducible_common.sh
parentbee43ac32e131f67afe0ac30c6e4a7808ab6a1c1 (diff)
downloadjenkins.debian.net-f6a925687705ff3f8dab9726100c4af65cfadeb5.tar.xz
reproducible: make diffoscope calls more robust, retry after 2m if the schroot was unavailable
Diffstat (limited to 'bin/reproducible_common.sh')
-rwxr-xr-xbin/reproducible_common.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index d3fd2a2f..c6e8a9fa 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -431,6 +431,7 @@ call_diffoscope() {
local TMPLOG=(mktemp --tmpdir=$TMPDIR)
local msg=""
set +e
+ # remember to also modify the retry diffoscope call 15 lines below
( timeout $TIMEOUT schroot \
--directory $TMPDIR \
-c source:jenkins-reproducible-${DBDSUITE}-diffoscope \
@@ -440,6 +441,22 @@ call_diffoscope() {
$TMPDIR/b2/$1/$2 2>&1 \
) 2>&1 >> $TMPLOG
RESULT=$?
+ LOG_RESULT=$(grep '^E: 15binfmt: update-binfmts: unable to open' $TMPLOG)
+ if [ ! -z "LOG_RESULT" ] ; then
+ rm -f $TMPLOG $TMPDIR/$1/$2.html
+ echo "$(date -u) - schroot jenkins-reproducible-${DBDSUITE}-diffoscope not availble, will sleep 2min and retry."
+ sleep 2m
+ # remember to also modify the retry diffoscope call 15 lines above
+ ( timeout $TIMEOUT schroot \
+ --directory $TMPDIR \
+ -c source:jenkins-reproducible-${DBDSUITE}-diffoscope \
+ diffoscope -- \
+ --html $TMPDIR/$1/$2.html \
+ $TMPDIR/b1/$1/$2 \
+ $TMPDIR/b2/$1/$2 2>&1 \
+ ) 2>&1 >> $TMPLOG
+ RESULT=$?
+ fi
if ! "$DEBUG" ; then set +x ; fi
set -e
cat $TMPLOG # print dbd output