diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-09-26 12:56:45 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-09-26 12:56:45 +0200 |
commit | 0cb8d2f23f19d5a50d2ec3d8e274d30349f4a00f (patch) | |
tree | 85d2c9647476ea9b16e3dd0be44612c93d5228d4 | |
parent | 2ec831986474e15aa090ac4c7ce2c1baa7e76576 (diff) | |
download | jenkins.debian.net-0cb8d2f23f19d5a50d2ec3d8e274d30349f4a00f.tar.xz |
reproducible: harmonize whitespaces
-rwxr-xr-x | bin/reproducible_build.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 02e55a19..56a4deca 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -29,8 +29,8 @@ create_results_dirs() { handle_race_condition() { echo | tee -a $BUILDLOG - local RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT builder FROM schedule WHERE package_id = '$SRCPKGID'") - local msg="Warning, package ${SRCPACKAGE} in ${SUITE} on ${ARCH} is probably already building at $RESULT, while this is $BUILD_URL.\n" + local RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT builder FROM schedule WHERE package_id='$SRCPKGID'") + local msg="Warning, package ${SRCPACKAGE} (id=$SRCPKGID) in ${SUITE} on ${ARCH} is probably already building at $RESULT, while this is $BUILD_URL.\n" printf "$msg" | tee -a $BUILDLOG printf "$(date -u) - $msg" >> /var/log/jenkins/reproducible-race-conditions.log echo "$(date -u) - Terminating this build quickly and nicely..." | tee -a $RBUILDLOG @@ -360,7 +360,7 @@ choose_package() { local RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} " SELECT s.suite, s.id, s.name, sch.date_scheduled, sch.save_artifacts, sch.notify, s.notify_maintainer, sch.builder FROM schedule AS sch JOIN sources AS s ON sch.package_id=s.id - WHERE sch.date_build_started = '' + WHERE sch.date_build_started='' AND s.architecture='$ARCH' ORDER BY date_scheduled LIMIT 5"|sort -R|head -1) if [ -z "$RESULT" ] ; then @@ -389,12 +389,12 @@ choose_package() { rm -f $BAD_BUILDS # mark build attempt, first test if none else marked a build attempt recently echo "ok, let's check if $SRCPACKAGE is building anywhere yet…" - local RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT date_build_started FROM schedule WHERE package_id = '$SRCPKGID'") + local RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT date_build_started FROM schedule WHERE package_id='$SRCPKGID'") if [ -z "$RESULT" ] ; then echo "ok, $SRCPACKAGE is not building anywhere…" # try to update the schedule with our build attempt, then check no else did it, if so, abort - sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started='$DATE', builder='$BUILDER' WHERE package_id = '$SRCPKGID' AND date_build_started='' AND (builder='' OR builder='TBD')" - RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT date_build_started FROM schedule WHERE package_id = '$SRCPKGID' AND date_build_started='$DATE' AND builder='$BUILDER'") + sqlite3 -init $INIT ${PACKAGES_DB} "UPDATE schedule SET date_build_started='$DATE', builder='$BUILDER' WHERE package_id='$SRCPKGID' AND date_build_started='' AND (builder='' OR builder='TBD')" + RESULT=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT date_build_started FROM schedule WHERE package_id='$SRCPKGID' AND date_build_started='$DATE' AND builder='$BUILDER'") if [ -z "$RESULT" ] ; then echo "hm, seems $SRCPACKAGE is building somewhere… failed to update the schedule table with our build." handle_race_condition |