From 21ce98cd746a35df07891084baea6bbde1876166 Mon Sep 17 00:00:00 2001 From: Valerie R Young Date: Fri, 16 Sep 2016 21:09:49 -0400 Subject: reproducible debian: make bash sql sqlite/postgres agnostic This commit does the following for all bash scripts: - remove sqlite specfic datetime functions in sql queries - remove double quotes from sql queries - replace the "REPLACE INTO" sql queries Signed-off-by: Mattia Rizzolo Signed-off-by: Holger Levsen --- bin/reproducible_maintenance.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/reproducible_maintenance.sh') diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index 5450395a..6ff3d106 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -249,12 +249,13 @@ if [ "$HOSTNAME" = "$MAINNODE" ] ; then # find packages which build didnt end correctly # echo "$(date -u) - Rescheduling builds which didn't end correctly." + DATE=$(date '+%Y-%m-%d %H:%M' -d "-2 days") QUERY=" 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 IS NOT NULL - AND p.date_build_started < datetime('now', '-48 hours') + AND p.date_build_started < '$DATE' ORDER BY p.date_scheduled " PACKAGES=$(mktemp --tmpdir=$TEMPDIR maintenance-XXXXXXXXXXXX) -- cgit v1.2.3-54-g00ecf