[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: scheduler: double check only packages with *higher* version are scheduled

Holger Levsen holger at moszumanska.debian.org
Sat Apr 11 13:03:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 150aab14d2cba0db59d1b09ec6c053ac07462ad7
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Fri Apr 10 21:21:42 2015 +0200

    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 7baf2df..5d3fccc 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
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list