diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-08-07 16:00:53 +0000 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-08-07 20:01:42 +0200 |
commit | 09391a8b9b270829df1bf142d40b036eb22a1cbb (patch) | |
tree | 65a3de932c8d86b65a4c15d6fab58414b928620e /bin | |
parent | 31d32eb5c7f9ac3de860b9c1782a1f808a631945 (diff) | |
download | jenkins.debian.net-09391a8b9b270829df1bf142d40b036eb22a1cbb.tar.xz |
reproducible: also find pending bugs and mark them with a brown P in the pages
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_common.py | 26 | ||||
-rwxr-xr-x | bin/reproducible_common.sh | 2 |
2 files changed, 21 insertions, 7 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index d6a820d7..0ed8011c 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -200,7 +200,8 @@ html_foot_page_style_note = Template((tab*2).join(""" A <code><span class="bug">#</span></code> sign after the name of a package indicates that a bug is filed against it. Likewise, a <code><span class="bug-patch">+</span></code> sign indicates there is - a patch available. <code><span class="bug-done">#</span></code> + a patch available, a <code><span class="bug-pending">P</span></code> means a + pending bug while <code><span class="bug-done">#</span></code> indicates a closed bug. In cases of several bugs, the symbol is repeated. </p>""".splitlines(True))) @@ -476,12 +477,13 @@ def get_bugs(): } """ query = """ - SELECT DISTINCT bugs.id, bugs.source, bugs.done, tags.tag + SELECT bugs.id, bugs.source, bugs.done, ARRAY_AGG(tags.tag) FROM bugs JOIN bugs_tags ON bugs.id = bugs_tags.id JOIN bugs_usertags ON bugs_tags.id = bugs_usertags.id JOIN sources ON bugs.source=sources.source LEFT JOIN ( - SELECT id, tag FROM bugs_tags WHERE tag='patch' + SELECT id, tag FROM bugs_tags + WHERE tag='patch' OR tag='pending' ) AS tags ON bugs.id = tags.id WHERE bugs_usertags.email = 'reproducible-builds@lists.alioth.debian.org' AND bugs.id NOT IN ( @@ -492,6 +494,7 @@ def get_bugs(): bugs_usertags.tag = 'toolchain' OR bugs_usertags.tag = 'infrastructure') ) + GROUP BY bugs.id, bugs.source, bugs.done """ # returns a list of tuples [(id, source, done)] global conn_udd @@ -508,14 +511,20 @@ def get_bugs(): if bug[1] not in packages: packages[bug[1]] = {} # bug[0] = bug_id, bug[1] = source_name, bug[2] = who_when_done, - # bug[3] = tag (patch) - packages[bug[1]][bug[0]] = {'done': False, 'patch': False} + # bug[3] = tag (patch or pending) + packages[bug[1]][bug[0]] = { + 'done': False, 'patch': False, 'pending': False + } if bug[2]: # if the bug is done packages[bug[1]][bug[0]]['done'] = True - if bug[3]: # the bug is patched + if 'patch' in bug[3]: # the bug is patched packages[bug[1]][bug[0]]['patch'] = True + if 'pending' in bug[3]: # the bug is pending + packages[bug[1]][bug[0]]['pending'] = True + log.debug(packages) return packages + def get_trailing_icon(package, bugs): html = '' if package in bugs: @@ -523,6 +532,8 @@ def get_trailing_icon(package, bugs): html += '<span class="' if bugs[package][bug]['done']: html += 'bug-done" title="#' + str(bug) + ', done">#</span>' + elif bugs[package][bug]['pending']: + html += 'bug-pending" title="#' + str(bug) + ', pending">P</span>' elif bugs[package][bug]['patch']: html += 'bug-patch" title="#' + str(bug) + ', with patch">+</span>' else: @@ -542,6 +553,8 @@ def get_trailing_bug_icon(bug, bugs, package=None): html += '<span class="' if bugs[package][bug]['done']: html += 'bug-done" title="#' + str(bug) + ', done">#' + elif bugs[package][bug]['pending']: + html += 'bug-pending" title="#' + str(bug) + ', pending">P' elif bugs[package][bug]['patch']: html += 'bug-patch" title="#' + str(bug) + ', with patch">+' else: @@ -551,6 +564,7 @@ def get_trailing_bug_icon(bug, bugs, package=None): pass return html + def irc_msg(msg): kgb = ['kgb-client', '--conf', '/srv/jenkins/kgb/debian-reproducible.conf', '--relay-msg'] diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index 107c55e4..15a8c37a 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -262,7 +262,7 @@ write_page_footer() { write_page_meta_sign() { write_page "<p style=\"font-size:0.9em;\">A package name displayed with a bold font is an indication that this package has a note. Visited packages are linked in green, those which have not been visited are linked in blue.</br>" - write_page "A <code><span class=\"bug\">#</span></code> sign after the name of a package indicates that a bug is filed against it. Likewise, a <code><span class=\"bug-patch\">+</span></code> sign indicates there is a patch available. <code><span class=\"bug-done\">#</span></code> indicates a closed bug. In cases of several bugs, the symbol is repeated.</p>" + write_page "A <code><span class=\"bug\">#</span></code> sign after the name of a package indicates that a bug is filed against it. Likewise, a <code><span class=\"bug-patch\">+</span></code> sign indicates there is a patch available, a <code><span class="bug-pending">P</span></code> means a pending bug while <code><span class=\"bug-done\">#</span></code> indicates a closed bug. In cases of several bugs, the symbol is repeated.</p>" } write_explaination_table() { |