[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: build/maintenance: another cases of ='' => IS NULL

Holger Levsen holger at moszumanska.debian.org
Thu Dec 10 00:03:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit f48a6c40eac4c82b026c29a810fcc890c0f8b507
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu Dec 10 00:01:19 2015 +0000

    reproducible: build/maintenance: another cases of ='' =>  IS NULL
---
 bin/reproducible_build.sh       | 6 +++---
 bin/reproducible_maintenance.sh | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 8cf68fb..959eb36 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -275,7 +275,7 @@ handle_reproducible() {
 
 unregister_build() {
 	# unregister this build so it will immeditiatly tried again
-	sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started='', job='' WHERE package_id='$SRCPKGID'"
+	sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started = NULL, job = NULL WHERE package_id='$SRCPKGID'"
 	NOTIFY=""
 }
 
@@ -427,7 +427,7 @@ choose_package() {
 		# reproducible-stale-builds.log is mailed once a day by reproducible_maintenance.sh
 		echo "$(date -u) - stale builds found, cleaning db from these:" | tee -a $STALELOG
 		cat $BAD_BUILDS | tee -a $STALELOG
-		sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started='', job='' WHERE job LIKE '${JOB_PREFIX}%'"
+		sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started = NULL, job = NULL WHERE job LIKE '${JOB_PREFIX}%'"
 		echo >> $STALELOG
 	fi
 	rm -f $BAD_BUILDS
@@ -693,7 +693,7 @@ build_rebuild() {
 	if [ ! -f b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] && [ -f b1/${SRCPACKAGE}_*_${ARCH}.changes ] ; then
 			echo "Version mismatch between main node (${SRCPACKAGE}_${EVERSION}_${ARCH}.dsc expected) and first build node ($(ls b1/*dsc)) for $SUITE/$ARCH, aborting. Please upgrade the schroots..." | tee -a ${RBUILDLOG}
 			# reschedule the package for later and quit the build without saving anything
-			sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started='', job='', date_scheduled='$(date -u +'%Y-%m-%d %H:%M')' WHERE package_id='$SRCPKGID'"
+			sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started = NULL, job = NULL, date_scheduled='$(date -u +'%Y-%m-%d %H:%M')' WHERE package_id='$SRCPKGID'"
 			NOTIFY=""
 			exit 0
 	elif [ -f b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index 19da931..755987d 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -192,7 +192,7 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then
 		SELECT s.id, s.name, p.date_scheduled, p.date_build_started
 			FROM schedule AS p JOIN sources AS s ON p.package_id=s.id
 			WHERE p.date_scheduled != ''
-			AND p.date_build_started != ''
+			AND p.date_build_started IS NOT NULL
 			AND p.date_build_started < datetime('now', '-36 hours')
 			ORDER BY p.date_scheduled
 		"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list