From 2393dc1308c671cafad6a7b728b47f4438d8fc32 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Sat, 11 Apr 2015 20:00:09 +0200 Subject: 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 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 += '\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 + ' ' + i[0] + \ - ':' + i[2] + '\n' + ':' + version + '\n' html += '\n' return tab*5 + (tab*7).join(html.splitlines(True)) -- cgit v1.2.3-70-g09d2