From 2727e9d49fcb0a95fb8fc941cbd50d71668cbfc2 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 30 Sep 2014 09:56:40 +0200 Subject: reproducible: prevent locking issues with apt-get --- bin/reproducible_build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2