diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-06-01 14:04:31 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-06-01 16:39:12 +0200 |
commit | 5f14b5906639f43f7a78c7285c3513f62dce79c3 (patch) | |
tree | a594369490cb861d2fbc609be726b6ccda844b85 /bin | |
parent | 4630b5cdaab642db42a1b6ac5689afe203b3987d (diff) | |
download | jenkins.debian.net-5f14b5906639f43f7a78c7285c3513f62dce79c3.tar.xz |
reproducible: html_packages: link those new logs
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_html_packages.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py index 10f4797c..d649b12d 100755 --- a/bin/reproducible_html_packages.py +++ b/bin/reproducible_html_packages.py @@ -109,6 +109,18 @@ def gen_status_link_icon(status, icon, suite, arch): return html.format(status=status, icon=icon, suite=suite, arch=arch) +def link_buildlogs(package, eversion, suite, arch): + html = '' + path = suite + '/' + arch + '/' + package + '_' + eversion + '.build{}.log.gz' + log = LOGS_PATH + '/' + path + uri = LOGS_URI + '/' + path + if os.access(log.format('1'), os.R_OK): + html += '<a href="' + uri.format('1') + '" target="main">log1</a>\n' + if os.access(logs.format('2'), os.R_OK): + html += '<a href="' + uri.format('2') + '" target="main">2</a>\n' + return html + + def gen_extra_links(package, version, suite, arch, status): eversion = strip_epoch(version) notes = NOTES_PATH + '/' + package + '_note.html' @@ -146,7 +158,7 @@ def gen_extra_links(package, version, suite, arch, status): else: log.debug('buildinfo not detected at ' + buildinfo) rbuild = pkg_has_rbuild(package, version, suite, arch) - if rbuild: # being a tuple (rbuild path, size), empty if non_existant + if rbuild: # being a tuple (rbuild path, size), empty if non existant url = RBUILD_URI + '/' + suite + '/' + arch + '/' + package + '_' + \ eversion + '.rbuild.log' # apache ignores the trailing .gz links +='<a href="' + url + '" target="main">rbuild (' + \ @@ -156,6 +168,7 @@ def gen_extra_links(package, version, suite, arch, status): elif status not in ('untested', 'blacklisted'): log.critical(REPRODUCIBLE_URL + '/' + suite + '/' + arch + '/' + package + ' didn\'t produce a buildlog, even though it has been built.') + links += link_buildlogs(package, eversion, suite, arch) default_view = '/untested.html' if not default_view else default_view return (links, default_view) |