summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-12-28 15:33:15 +0100
committerHolger Levsen <holger@layer-acht.org>2014-12-28 15:33:15 +0100
commit823cfdefc33e2271e35980c6ff85a6983911ad37 (patch)
treedd26c880ee6a3becd5d4ddefd08eaa772305e733 /bin
parentd39889c8243964d88e1d13aae4e01c0215cb602d (diff)
downloadjenkins.debian.net-823cfdefc33e2271e35980c6ff85a6983911ad37.tar.xz
reproducible: try to update sources tables five times before failing the job
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_scheduler.sh19
1 files changed, 17 insertions, 2 deletions
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