From eac2164ac72ed531c5acc2be47f7b2ab576103b0 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Sat, 1 Aug 2015 09:19:05 +0000 Subject: reproducible: maintenance: do not auto-reschedule packages which actually succeeded --- bin/reproducible_maintenance.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bin/reproducible_maintenance.sh') diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index bc6ccb14..3bb003a4 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -79,8 +79,13 @@ if [ ! -z "$FAILED_BUILDS" ] ; then for SUITE in $(echo $FAILED_BUILDS | sed "s# #\n#g" | cut -d "/" -f8 | sort -u) ; do REQUESTER="jenkins maintenance job" REASON="maintenance reschedule: reschedule builds which failed due to network errors" - CANDIDATES=$(for PKG in $(echo $FAILED_BUILDS | sed "s# #\n#g" | grep "/$SUITE/" | cut -d "/" -f10 | cut -d "_" -f1) ; do echo -n "$PKG " ; done) - schedule_packages $CANDIDATES + CANDIDATES=$(for PKG in $(echo $FAILED_BUILDS | sed "s# #\n#g" | grep "/$SUITE/" | cut -d "/" -f10 | cut -d "_" -f1) ; do echo "$PKG" ; done) + # double check those builds actually failed + for pkg in $CANDIDATES ; do + QUERY="SELECT s.name FROM sources AS s JOIN results AS r ON r.package_id=s.id WHERE s.suite='$SUITE' AND r.status='FTBFS' AND s.name='$pkg'" + TO_SCHEDULE=${TO_SCHEDULE:+"$TO_SCHEDULE "}$(sqlite3 $INIT $PACKAGES_DB "$QUERY") + done + schedule_packages $TO_SCHEDULE done DIRTY=true fi -- cgit v1.2.3-70-g09d2