From 43dc2385dcc76e2b30f4e8cd243d8c756a117259 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Jul 31 2020 23:38:37 +0000 Subject: For second mass rebuild we have to skip completed builds completeAfter returns all the builds that are completed whether they are failed or not, we are only interested in successful builds to skip them Signed-off-by: Mohan Boddu --- diff --git a/scripts/mass-rebuild-second-run.py b/scripts/mass-rebuild-second-run.py index cd70282..41a4965 100755 --- a/scripts/mass-rebuild-second-run.py +++ b/scripts/mass-rebuild-second-run.py @@ -88,9 +88,9 @@ for pkg in pkgs: print('Skipping %s, package is explicitely skipped') continue - # Query to see if a build has already been attempted - # this version requires newer koji: - builds = kojisession.listBuilds(id, completeAfter=massrebuild['epoch']) + # Query to see if a build has already successfully completed + # state = 1 is successfully completed builds + builds = kojisession.listBuilds(id, completeAfter=massrebuild['epoch'], state=1) newbuild = False # Check the builds to make sure they were for the target we care about for build in builds: