summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-03 19:52:22 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-03 19:52:22 +0200
commit81fc5ed79cf2105c7259d81a33db7e42e6b15233 (patch)
tree7a83472cd40597c62da57d0caa5b777a6ad7117c /bin
parent66dcd4c53ca58f36ae6ea5a4458ee8bbefd992c4 (diff)
downloadjenkins.debian.net-81fc5ed79cf2105c7259d81a33db7e42e6b15233.tar.xz
reproducible: show proper spoken stati on pkg pages
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_packages.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index a2f7b12a..4221bfc2 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -70,19 +70,25 @@ def sizeof_fmt(num):
def gen_status_link_icon(status, icon, suite, arch):
+ if status == 'not_for_us':
+ spokenstatus = 'not for us'
+ elif status == 'FTBR':
+ spokenstatus = 'unreproducible'
+ else:
+ spokenstatus = status
html = """
- <a href="/{suite}/{arch}/index_{status}.html" target="_parent" title="{status}">
- <img src="/static/{icon}" alt="{status}"></a>
+ <a href="/{suite}/{arch}/index_{status}.html" target="_parent" title="{spokenstatus}">
+ <img src="/static/{icon}" alt="{spokenstatus}"></a>
- <a href="/{suite}/{arch}/index_{status}.html" target="_parent" title="{status}">
- {status}</a>
+ <a href="/{suite}/{arch}/index_{status}.html" target="_parent" title="{spokenstatus}">
+ {spokenstatus}</a>
"""
# There are no indices for untested packages
if status == 'untested':
html = '<img src="/static/{icon}" alt="{status}"> {status}'
- return html.format(status=status, icon=icon, suite=suite, arch=arch)
+ return html.format(status=status, spokenstatus=spokenstatus, icon=icon, suite=suite, arch=arch)
def link_buildlogs(package, eversion, suite, arch):
@@ -193,7 +199,8 @@ def gen_suites_links(package, current_suite, current_arch):
prefix = ''
suffix = '\n'
icon = prefix + '<img src="/static/{icon}" alt="{status}" title="{status}"/>' + suffix
- html += icon.format(icon=join_status_icon(status)[1], status=status)
+ status, icon = join_status_icon(status, pkg, version)
+ html += icon.format(icon=icon, status=status)
html += (tab*2 + ' <a href="{}/{}/{}/{}.html" target="_parent"' + \
' title="{}: {}{}">{}</a> in <a href="/{}/{}/" target="_parent">{}</a>\n').format(RB_PKG_URI,
s, a, package.name, status, version, build_date, version, s, a, s)
@@ -232,7 +239,7 @@ def gen_packages_html(packages, no_clean=False):
links, default_view = gen_extra_links(
pkg, version, suite, arch, status)
suites_links = gen_suites_links(package, suite, arch)
- status, icon = join_status_icon(status, pkg, version)
+ status, icon = join_status_icon(status, package, version)
status = gen_status_link_icon(status, icon, suite, arch)
html = html_package_page.substitute(