From 823cfdefc33e2271e35980c6ff85a6983911ad37 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 28 Dec 2014 15:33:15 +0100 Subject: reproducible: try to update sources tables five times before failing the job --- bin/reproducible_scheduler.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_scheduler.sh b/bin/reproducible_scheduler.sh index 2305b134..84662197 100755 --- a/bin/reproducible_scheduler.sh +++ b/bin/reproducible_scheduler.sh @@ -62,7 +62,9 @@ update_sources_table() { if [ $P_IN_TMPFILE -ne $P_IN_SOURCES ] ; then echo "DEBUG: P_IN_SOURCES = $P_IN_SOURCES" echo "DEBUG: P_IN_TMPFILE = $P_IN_TMPFILE" - exit 1 + RESULT=1 + else + RESULT=0 fi } @@ -159,7 +161,20 @@ if [ $COUNT_SCHEDULED -gt 250 ] ; then else echo "$COUNT_SCHEDULED packages currently scheduled, scheduling some more..." fi -update_sources_table + +RESULT=0 +for i in 1 2 3 4 5 ; do + # try fives times, before failing the job + update_sources_table + if [ $RESULT -eq 0 ] ; then + break + fi + sleep 2m +done +if [ $RESULT -ne 0 ] ; then + echo "failure to update sources table" + exit 1 +fi echo "Requesting 200 unknown packages..." select_unknown_packages 200 -- cgit v1.2.3-54-g00ecf