summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-09-30 09:56:40 +0200
committerHolger Levsen <holger@layer-acht.org>2014-09-30 09:56:40 +0200
commit2727e9d49fcb0a95fb8fc941cbd50d71668cbfc2 (patch)
treef7317d1337cc0c37d79533ba77a39feb7b5360bc /bin
parent7fb09e10865158a30e2dd3aff80ac1e6a69a99ea (diff)
downloadjenkins.debian.net-2727e9d49fcb0a95fb8fc941cbd50d71668cbfc2.tar.xz
reproducible: prevent locking issues with apt-get
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 29d64337..e2cc2ad6 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -54,7 +54,9 @@ EOF
# this needs sid entries in sources.list:
grep deb-src /etc/apt/sources.list | grep sid
-sudo apt-get update
+# try apt-get update twice, else fail gracefully, aka not.
+sudo apt-get update || ( sleep $(( $RANDOM % 100 )) ; sudo apt-get update || true )
+
set +x
# if $1 is an integer, build $1 random packages