From aa1caee608ede2cc0d89592ec7407de288df2a96 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 18 Oct 2014 02:01:54 +0200 Subject: reproducible: fix db locking --- bin/reproducible_common.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin/reproducible_common.sh') 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." -- cgit v1.2.3-54-g00ecf