summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-02-26 23:56:03 +0100
committerHolger Levsen <holger@layer-acht.org>2015-02-27 17:12:59 +0100
commit6d8cc5576606b494b35613a8be5dbdf5e490ae6f (patch)
treeb18b36908a214315389a694b02e026d9c2301fcc /bin
parentd0216cc17479fd2f0593766c6edaf1f95753370c (diff)
downloadjenkins.debian.net-6d8cc5576606b494b35613a8be5dbdf5e490ae6f.tar.xz
reproducible: html_packages: avoid calling strip_epoch() 6 times in the same function
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_packages.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index d51180cd..4ed7806e 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -78,10 +78,11 @@ def check_package_status(package, suite):
return (status, version, build_date)
def gen_extra_links(package, version):
+ eversion = strip_epoch(version)
notes = NOTES_PATH + '/' + package + '_note.html'
- rbuild = RBUILD_PATH + '/' + package + '_' + strip_epoch(version) + '.rbuild.log'
- buildinfo = BUILDINFO_PATH + '/' + package + '_' + strip_epoch(version) + '_amd64.buildinfo'
- dbd = DBD_PATH + '/' + package + '_' + strip_epoch(version) + '.debbindiff.html'
+ rbuild = RBUILD_PATH + '/' + package + '_' + eversion + '.rbuild.log'
+ buildinfo = BUILDINFO_PATH + '/' + package + '_' + eversion + '_amd64.buildinfo'
+ dbd = DBD_PATH + '/' + package + '_' + eversion + '.debbindiff.html'
links = ''
default_view = False
@@ -93,21 +94,21 @@ def gen_extra_links(package, version):
else:
log.debug('notes not detected at ' + notes)
if os.access(dbd, os.R_OK):
- url = DBD_URI + '/' + package + '_' + strip_epoch(version) + '.debbindiff.html'
+ url = DBD_URI + '/' + package + '_' + eversion + '.debbindiff.html'
links += '<a href="' + url + '" target="main">debbindiff</a>\n'
if not default_view:
default_view = url
else:
log.debug('debbindiff not detetected at ' + dbd)
if pkg_has_buildinfo(package, version):
- url = BUILDINFO_URI + '/' + package + '_' + strip_epoch(version) + '_amd64.buildinfo'
+ url = BUILDINFO_URI + '/' + package + '_' + eversion + '_amd64.buildinfo'
links += '<a href="' + url + '" target="main">buildinfo</a>\n'
if not default_view:
default_view = url
else:
log.debug('buildinfo not detected at ' + buildinfo)
if os.access(rbuild, os.R_OK):
- url = RBUILD_URI + '/' + package + '_' + strip_epoch(version) + '.rbuild.log'
+ url = RBUILD_URI + '/' + package + '_' + eversion + '.rbuild.log'
log_size = os.stat(rbuild).st_size
links +='<a href="' + url + '" target="main">rbuild (' + \
sizeof_fmt(log_size) + ')</a>\n'