diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-02-17 01:36:53 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-02-17 09:29:19 +0100 |
commit | 78b1a05147550c784a8083de3a75ea99206dde06 (patch) | |
tree | 0b77006ac6aa89eb8f843ed5d2a936a4c68b9a04 | |
parent | af6565ccc3c88cc99bc73e1df61d1878d4d51a74 (diff) | |
download | jenkins.debian.net-78b1a05147550c784a8083de3a75ea99206dde06.tar.xz |
reproducible: notes: split the package list in the index_{no_,}notes pages according to status
-rwxr-xr-x | bin/reproducible_html_notes.py | 62 |
1 files changed, 42 insertions, 20 deletions
diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index 0dfa9b44..faa8807e 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -344,16 +344,29 @@ def index_issues(issues): def index_notes(notes, bugs): log.debug('Building the index_notes page...') - html = '\n<p>There are ' + str(len(notes)) + ' packages with notes.</p>\n' - html += '<p>\n' + tab + '<code>\n' + all_pkgs = query_db('SELECT name, status FROM source_packages ' + + 'ORDER BY name') + with_notes = [x for x in all_pkgs if x[0] in notes] + html = '\n<p>There are ' + str(len(notes)) + ' packages with notes.<br />\n' + html += 'In particular:</p>\n' + for status in ['unreproducible', 'FTBFS', 'not for us', 'blacklisted', 'reproducible']: + pkgs = [x[0] for x in with_notes if x[1] == status] + if not pkgs: + continue + html += '<p>\n' + html += tab + '<img src="/static/' + join_status_icon(status)[1] + '"' + html += ' alt="' + status + ' icon" />\n' + pkgs = [x[0] for x in with_notes if x[1] == status] + html += tab + str(len(pkgs)) + ' ' + status + ' packages:\n' + html += tab + '<code>\n' + for pkg in pkgs: + url = RB_PKG_URI + '/' + pkg + '.html' + html += tab*2 + '<a href="' + url + '" class="noted">' + pkg + html += '</a>' + get_trailing_icon(pkg, bugs) + '\n' + html += tab + '</code>\n' + html += '</p>\n' + html += '<p>Notes are stored in <a href="https://anonscm.debian.org/cgit/reproducible/notes.git" target="_parent">notes.git</a>.</p>' html = (tab*2).join(html.splitlines(True)) - for pkg in sorted(notes): - url = RB_PKG_URI + '/' + pkg + '.html' - html += tab*4 + '<a href="' + url + '" class="noted">' + pkg + '</a>' - html += get_trailing_icon(pkg, bugs) + '\n' - html += tab*3 + '</code>\n' - html += tab*2 + '</p>\n' - html += tab*2 + '<p>Notes are stored in <a href="https://anonscm.debian.org/cgit/reproducible/notes.git" target="_parent">notes.git</a>.</p>' title = 'Overview of packages with notes' destfile = BASE + '/index_notes.html' desturl = REPRODUCIBLE_URL + '/index_notes.html' @@ -364,22 +377,31 @@ def index_notes(notes, bugs): def index_no_notes(notes, bugs): log.debug('Building the index_no_notes page...') - all_pkgs = query_db('SELECT name FROM source_packages ' + + all_pkgs = query_db('SELECT name, status FROM source_packages ' + 'WHERE status = "unreproducible" OR status = "FTBFS"' + 'ORDER BY build_date DESC') - without_notes = [x[0] for x in all_pkgs if x[0] not in notes] + without_notes = [x for x in all_pkgs if x[0] not in notes] html = '\n<p>There are ' + str(len(without_notes)) + ' unreproducible ' \ + 'packages without notes. These are the packages with failures ' \ - + 'that still need to be investigated: </p>\n' - html += '<p>\n' + tab + '<code>\n' + + 'that still need to be investigated.<br />\n' + html += 'In particular:</p>\n' + for status in ['unreproducible', 'FTBFS']: + pkgs = [x[0] for x in without_notes if x[1] == status] + if not pkgs: + continue + html += '<p>\n' + html += tab + '<img src="/static/' + join_status_icon(status)[1] + '"' + html += ' alt="' + status + ' icon" />\n' + html += tab + str(len(pkgs)) + ' ' + status + ' packages:\n' + html += tab + '<code>\n' + for pkg in pkgs: + url = RB_PKG_URI + '/' + pkg + '.html' + html += tab*2 + '<a href="' + url + '" class="package">' + pkg + html += '</a>' + get_trailing_icon(pkg, bugs) + '\n' + html += tab + '</code>\n' + html += '</p>\n' + html += '<p>Notes are stored in <a href="https://anonscm.debian.org/cgit/reproducible/notes.git" target="_parent">notes.git</a>.</p>' html = (tab*2).join(html.splitlines(True)) - for pkg in without_notes: - url = RB_PKG_URI + '/' + pkg + '.html' - html += tab*4 + '<a href="' + url + '" class="package">' + pkg + '</a>' - html += get_trailing_icon(pkg, bugs) + '\n' - html += tab*3 + '</code>\n' - html += tab*2 + '</p>\n' - html += tab*2 + '<p>Notes are stored in <a href="https://anonscm.debian.org/cgit/reproducible/notes.git" target="_parent">notes.git</a>.</p>' title = 'Overview of packages without notes' destfile = BASE + '/index_no_notes.html' desturl = REPRODUCIBLE_URL + '/index_no_notes.html' |