summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-18 02:01:54 +0200
committerHolger Levsen <holger@layer-acht.org>2014-10-18 02:01:54 +0200
commitaa1caee608ede2cc0d89592ec7407de288df2a96 (patch)
tree5072ac440af019a34cb60c59bc76ac1e2d1a84c5 /bin
parent69c729ad0764c8f5b969920a82eda37a26f741d3 (diff)
downloadjenkins.debian.net-aa1caee608ede2cc0d89592ec7407de288df2a96.tar.xz
reproducible: fix db locking
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_common.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 3fe391ce..775033c7 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -13,12 +13,15 @@ if [ -f $PACKAGES_DB ] && [ -f $INIT ] ; then
if [ -f $PACKAGES_DB.lock ] ; then
for i in $(seq 0 100) ; do
sleep 15
+ echo "sleeping 15s, $PACKAGES_DB is locked."
if [ ! -f $PACKAGES_DB.lock ] ; then
break
fi
done
- echo "$PACKAGES_DB.lock still exist, exiting."
- exit 1
+ if [ -f $PACKAGES_DB.lock ] ; then
+ echo "$PACKAGES_DB.lock still exist, exiting."
+ exit 1
+ fi
fi
elif [ ! -f ${PACKAGES_DB} ] ; then
echo "Warning: $PACKAGES_DB doesn't exist, creating it now."