From 78b1a05147550c784a8083de3a75ea99206dde06 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Tue, 17 Feb 2015 01:36:53 +0100 Subject: reproducible: notes: split the package list in the index_{no_,}notes pages according to status --- bin/reproducible_html_notes.py | 62 ++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 20 deletions(-) (limited to 'bin') 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

There are ' + str(len(notes)) + ' packages with notes.

\n' - html += '

\n' + tab + '\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

There are ' + str(len(notes)) + ' packages with notes.
\n' + html += 'In particular:

\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 += '

\n' + html += tab + '\n' + pkgs = [x[0] for x in with_notes if x[1] == status] + html += tab + str(len(pkgs)) + ' ' + status + ' packages:\n' + html += tab + '\n' + for pkg in pkgs: + url = RB_PKG_URI + '/' + pkg + '.html' + html += tab*2 + '' + pkg + html += '' + get_trailing_icon(pkg, bugs) + '\n' + html += tab + '\n' + html += '

\n' + html += '

Notes are stored in notes.git.

' html = (tab*2).join(html.splitlines(True)) - for pkg in sorted(notes): - url = RB_PKG_URI + '/' + pkg + '.html' - html += tab*4 + '' + pkg + '' - html += get_trailing_icon(pkg, bugs) + '\n' - html += tab*3 + '
\n' - html += tab*2 + '

\n' - html += tab*2 + '

Notes are stored in notes.git.

' 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

There are ' + str(len(without_notes)) + ' unreproducible ' \ + 'packages without notes. These are the packages with failures ' \ - + 'that still need to be investigated:

\n' - html += '

\n' + tab + '\n' + + 'that still need to be investigated.
\n' + html += 'In particular:

\n' + for status in ['unreproducible', 'FTBFS']: + pkgs = [x[0] for x in without_notes if x[1] == status] + if not pkgs: + continue + html += '

\n' + html += tab + '\n' + html += tab + str(len(pkgs)) + ' ' + status + ' packages:\n' + html += tab + '\n' + for pkg in pkgs: + url = RB_PKG_URI + '/' + pkg + '.html' + html += tab*2 + '' + pkg + html += '' + get_trailing_icon(pkg, bugs) + '\n' + html += tab + '\n' + html += '

\n' + html += '

Notes are stored in notes.git.

' html = (tab*2).join(html.splitlines(True)) - for pkg in without_notes: - url = RB_PKG_URI + '/' + pkg + '.html' - html += tab*4 + '' + pkg + '' - html += get_trailing_icon(pkg, bugs) + '\n' - html += tab*3 + '
\n' - html += tab*2 + '

\n' - html += tab*2 + '

Notes are stored in notes.git.

' title = 'Overview of packages without notes' destfile = BASE + '/index_no_notes.html' desturl = REPRODUCIBLE_URL + '/index_no_notes.html' -- cgit v1.2.3-70-g09d2