From 5f14b5906639f43f7a78c7285c3513f62dce79c3 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 1 Jun 2015 14:04:31 +0200 Subject: reproducible: html_packages: link those new logs --- bin/reproducible_html_packages.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'bin') 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 += 'log1\n' + if os.access(logs.format('2'), os.R_OK): + html += '2\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 +='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) -- cgit v1.2.3-70-g09d2