[Qa-jenkins-scm] [jenkins.debian.net] 05/05: reproducible: html_packages: link those new logs

Holger Levsen holger at moszumanska.debian.org
Mon Jun 1 14:39:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 5f14b5906639f43f7a78c7285c3513f62dce79c3
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Mon Jun 1 14:04:31 2015 +0200

    reproducible: html_packages: link those new logs
---
 bin/reproducible_html_packages.py | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 10f4797..d649b12 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)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list