summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_build.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-27 21:29:23 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-27 21:29:23 +0100
commitd56a804f8b784c5d149c401557d1f2cde4421668 (patch)
treee5d343531548ff7fe2c90926f3e316d38cf22eaf /bin/reproducible_build.sh
parent182ee13f4c919683d3c59bf59fa55091376e8d61 (diff)
downloadjenkins.debian.net-d56a804f8b784c5d149c401557d1f2cde4421668.tar.xz
Revert "reproducible: use transaction to reliable prevent race conditions"
This reverts commit 675367e1fd73f2a117e459753a7db4d30277f59d.
Diffstat (limited to 'bin/reproducible_build.sh')
-rwxr-xr-xbin/reproducible_build.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 891f0968..70cb38a2 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -182,12 +182,8 @@ else
START=$(date +'%s')
DURATION=0
# mark build attempt
- RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "BEGIN IMMEDIATE TRANSACTION; SELECT package_id, date_build_started FROM schedule WHERE package_id = '$SRCPKGID' AND date_build_started = ''; REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$SRCPKGID', '$SCHEDULED_DATE', '$DATE'); ROLLBACK TRANSACTION;")
- if [ -z "$RESULT" ] ; then
- echo "Package build has just been started by another job, aborting."
- echo "Warning, package ${SRCPACKAGE} in ${SUITE} on ${ARCH} is probably already building elsewhere, exiting. Please check $BUILD_URL and https://reproducible.debian.net/$SUITE/$ARCH/${SRCPACKAGE} for a different BUILD_URL..." | mail -s "race condition prevented" qa-jenkins-scm@lists.alioth.debian.org
- exit 0
- fi
+ sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$SRCPKGID', '$SCHEDULED_DATE', '$DATE');"
+
RBUILDLOG=/var/lib/jenkins/userContent/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_None.rbuild.log
echo "Starting to build ${SRCPACKAGE}/${SUITE} on $DATE" | tee ${RBUILDLOG}
echo "The jenkins build log is/was available at $BUILD_URL/console" | tee -a ${RBUILDLOG}