summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-06-02 15:25:31 +0200
committerHolger Levsen <holger@layer-acht.org>2015-06-06 20:31:55 +0200
commit87f367d33a90be59ca7f4d33b01af7249b07a38e (patch)
tree2035e882efd4ddd59ebd5c8f7c9a3dc921166841 /bin
parentbcfbd0a91752ee7e63299a23e5d0840c25f6d08d (diff)
downloadjenkins.debian.net-87f367d33a90be59ca7f4d33b01af7249b07a38e.tar.xz
reproducible: build: use sql UPDATE instead of REPLACE to mark the package as building => avoid losing data from the db (such as save_artifacts)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 55912ceb..72b91c46 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -351,7 +351,7 @@ init() {
echo "============================================================================="
# mark build attempt
if [ -z "$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT date_build_started FROM schedule WHERE package_id = '$SRCPKGID'")" ] ; then
- sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$SRCPKGID', '$SCHEDULED_DATE', '$DATE');"
+ sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started='$DATE' WHERE package_id = '$SRCPKGID'"
else
BAD_LOCKFILE=true
handle_race_condition db