[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: _html_packages: in the suite links, show the tested version and not the available version, if the package got already tested

Holger Levsen holger at moszumanska.debian.org
Sun Apr 12 10:51:57 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 2393dc1308c671cafad6a7b728b47f4438d8fc32
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Sat Apr 11 20:00:09 2015 +0200

    reproducible: _html_packages: in the suite links, show the tested version and not the available version, if the package got already tested
---
 bin/reproducible_html_packages.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 3898950..a5b35d1 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -158,7 +158,7 @@ def gen_extra_links(package, version, suite, arch, status):
 
 def gen_suites_links(package, suite):
     html = ''
-    query = 'SELECT s.suite, s.architecture, s.version, r.status ' + \
+    query = 'SELECT s.suite, s.architecture, s.version, r.version, r.status ' + \
             'FROM sources AS s LEFT JOIN results AS r ON r.package_id=s.id ' + \
             'WHERE s.name="{pkg}"'.format(pkg=package)
     results = query_db(query)
@@ -168,10 +168,12 @@ def gen_suites_links(package, suite):
     if len(results) == 1:
         return html
     for i in results:
-        # i[0]: suite, i[1]: arch, i[2]: version, i[3]: status (NULL if untested)
-        if i[0] == suite:
+        # i[0]: suite, i[1]: arch, i[2]: avail version, i[3]: tested version,
+        # i[4]: status (i[2] and i[3] will be NULL if untested)
+        if i[0] == suite:  # don't link the current suite
             continue
-        status = 'untested' if not i[3] else i[3]
+        status = 'untested' if not i[4] else i[4]
+        version = i[3] if i[3] else i[2]
         if status == 'unreproducible':
             status = 'FTBR'
         html += '<span class="avoidwrap">\n' + tab
@@ -185,7 +187,7 @@ def gen_suites_links(package, suite):
         html += icon.format(icon=join_status_icon(status)[1], status=status)
         html += tab + ' <a href="' + RB_PKG_URI + '/' + i[0] + '/' + i[1] + \
                 '/' + str(package) + '.html" target="_parent">' + i[0] + \
-                ':' + i[2] + '</a>\n'
+                ':' + version + '</a>\n'
         html += '</span>\n'
     return tab*5 + (tab*7).join(html.splitlines(True))
 

-- 
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