summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-10 21:21:42 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-11 15:00:21 +0200
commit150aab14d2cba0db59d1b09ec6c053ac07462ad7 (patch)
tree88cff292730d02618d5d552d5c2520071142a024 /bin
parent4a19c637448fa15306cda95b793fe4facdc6f964 (diff)
downloadjenkins.debian.net-150aab14d2cba0db59d1b09ec6c053ac07462ad7.tar.xz
reproducible: scheduler: double check only packages with *higher* version are scheduled
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_scheduler.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py
index 7baf2df4..5d3fccc2 100755
--- a/bin/reproducible_scheduler.py
+++ b/bin/reproducible_scheduler.py
@@ -176,7 +176,7 @@ def scheduler_untested_packages(suite, limit):
def scheduler_new_versions(suite, limit):
criteria = 'tested before, new version available, sorted by last build date'
- query = """SELECT DISTINCT s.id, s.name
+ query = """SELECT DISTINCT s.id, s.name, s.version, r.version
FROM sources AS s JOIN results AS r ON s.id = r.package_id
WHERE s.suite='{suite}'
AND s.version != r.version
@@ -185,7 +185,9 @@ def scheduler_new_versions(suite, limit):
AND s.id NOT IN (SELECT schedule.package_id FROM schedule)
ORDER BY r.build_date
LIMIT {limit}""".format(suite=suite, limit=limit)
- packages = query_db(query)
+ pkgs = query_db(query)
+ # this is to avoid perpetual rescheduling of packages in our exp repository
+ packages = [(x[0], x[1]) for x in pkgs if version_compare(x[2], x[3]) > 0]
print_schedule_result(suite, criteria, packages)
return packages