From 87f367d33a90be59ca7f4d33b01af7249b07a38e Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Tue, 2 Jun 2015 15:25:31 +0200 Subject: reproducible: build: use sql UPDATE instead of REPLACE to mark the package as building => avoid losing data from the db (such as save_artifacts) --- bin/reproducible_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/reproducible_build.sh') 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 -- cgit v1.2.3-54-g00ecf