summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-11 20:00:09 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-12 12:48:41 +0200
commit2393dc1308c671cafad6a7b728b47f4438d8fc32 (patch)
tree3cf28facf1cb459cdc8e1f84663048d0371ca4b5 /bin
parent5a260a9c41abf8fea31d32237eed0e52b5807095 (diff)
downloadjenkins.debian.net-2393dc1308c671cafad6a7b728b47f4438d8fc32.tar.xz
reproducible: _html_packages: in the suite links, show the tested version and not the available version, if the package got already tested
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_packages.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 3898950b..a5b35d17 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))