diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-09-30 09:56:40 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-09-30 09:56:40 +0200 |
commit | 2727e9d49fcb0a95fb8fc941cbd50d71668cbfc2 (patch) | |
tree | f7317d1337cc0c37d79533ba77a39feb7b5360bc /bin | |
parent | 7fb09e10865158a30e2dd3aff80ac1e6a69a99ea (diff) | |
download | jenkins.debian.net-2727e9d49fcb0a95fb8fc941cbd50d71668cbfc2.tar.xz |
reproducible: prevent locking issues with apt-get
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build.sh | 4 |
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 |