summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh7
-rwxr-xr-xbin/reproducible_setup.sh13
-rwxr-xr-xbin/reproducible_stats.sh7
3 files changed, 27 insertions, 0 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 111e16b5..d1c1f5b1 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -12,6 +12,13 @@ INIT=/var/lib/jenkins/reproducible.init
if [ ! -f $PACKAGES_DB ] ; then
echo "$PACKAGES_DB doesn't exist, no builds possible."
exit 1
+elif [ -f $PACKAGES_DB.lock ] ; then
+ for i in $(seq 0 100) ; do
+ sleep 15
+ [ -f $PACKAGES_DB.lock ] || break
+ done
+ echo "$PACKAGES_DB.lock still exist, exiting."
+ exit 1
fi
# create dirs for results
diff --git a/bin/reproducible_setup.sh b/bin/reproducible_setup.sh
index 50c7ac44..9bd0b341 100755
--- a/bin/reproducible_setup.sh
+++ b/bin/reproducible_setup.sh
@@ -18,9 +18,22 @@ if [ ! -f ${PACKAGES_DB} ] ; then
build_date TEXT NOT NULL,
PRIMARY KEY (name))'
sqlite3 ${PACKAGES_DB} '
+ CREATE TABLE sources_scheduled
+ (name TEXT NOT NULL,
+ date_scheduled TEXT NOT NULL,
+ date_build_started TEXT NOT NULL,
+ PRIMARY KEY (name))'
+ sqlite3 ${PACKAGES_DB} '
CREATE TABLE sources
(name TEXT NOT NULL,
version TEXT NOT NULL)'
+elif [ -f $PACKAGES_DB.lock ] ; then
+ for i in $(seq 0 100) ; do
+ sleep 15
+ [ -f $PACKAGES_DB.lock ] || break
+ done
+ echo "$PACKAGES_DB.lock still exist, exiting."
+ exit 1
fi
# 30 seconds timeout when trying to get a lock
INIT=/var/lib/jenkins/reproducible.init
diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh
index 8a84f8be..933a666d 100755
--- a/bin/reproducible_stats.sh
+++ b/bin/reproducible_stats.sh
@@ -13,6 +13,13 @@ INIT=/var/lib/jenkins/reproducible.init
if [ ! -f $PACKAGES_DB ] ; then
echo "$PACKAGES_DB doesn't exist, no stats possible."
exit 1
+elif [ -f $PACKAGES_DB.lock ] ; then
+ for i in $(seq 0 100) ; do
+ sleep 15
+ [ -f $PACKAGES_DB.lock ] || break
+ done
+ echo "$PACKAGES_DB.lock still exist, exiting."
+ exit 1
fi
declare -A GOOD