From 150aab14d2cba0db59d1b09ec6c053ac07462ad7 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Fri, 10 Apr 2015 21:21:42 +0200 Subject: reproducible: scheduler: double check only packages with *higher* version are scheduled --- bin/reproducible_scheduler.py | 6 ++++-- 1 file 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 -- cgit v1.2.3-70-g09d2