diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_common.py | 2 | ||||
-rwxr-xr-x | bin/reproducible_common.sh | 2 | ||||
-rwxr-xr-x | bin/reproducible_html_indexes.py | 45 |
3 files changed, 28 insertions, 21 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 7dc0e21b..e33d24f8 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -151,6 +151,7 @@ html_head_page = Template((tab*2).join(""" <li><a href="/index_issues.html">issues</a></li> <li><a href="/index_notes.html">packages with notes</a></li> <li><a href="/index_no_notes.html">package without notes</a></li> + <li><a href="/index_scheduled.html">currently scheduled</a></li> $links <li><a href="/index_repo_stats.html">repositories overview</a></li> <li><a href="/reproducible.html">reproducible stats</a></li> @@ -185,7 +186,6 @@ def print_critical_message(msg): def _gen_links(suite, arch): links = [ - ('scheduled', '<li><a href="/{suite}/{arch}/index_scheduled.html">currently scheduled</a></li>'), ('last_24h', '<li><a href="/{suite}/{arch}/index_last_24h.html">packages tested in the last 24h</a></li>'), ('last_48h', '<li><a href="/{suite}/{arch}/index_last_48h.html">packages tested in the last 48h</a></li>'), ('all_abc', '<li><a href="/{suite}/{arch}/index_all_abc.html">all tested packages (sorted alphabetically)</a></li>'), diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index c096ac36..3e17d793 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -77,7 +77,7 @@ init_html() { MAINVIEW="stats" ALLSTATES="reproducible FTBR FTBFS 404 not_for_us blacklisted" ALLVIEWS="issues notes no_notes scheduled last_24h last_48h all_abc dd-list pkg_sets suite_stats repo_stats stats" - GLOBALVIEWS="issues notes no_notes repo_stats stats" + GLOBALVIEWS="issues notes no_notes scheduled repo_stats stats" SUITEVIEWS="dd-list suite_stats" SPOKENTARGET["issues"]="issues" SPOKENTARGET["notes"]="packages with notes" diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py index d68aea9d..9230fc08 100755 --- a/bin/reproducible_html_indexes.py +++ b/bin/reproducible_html_indexes.py @@ -44,7 +44,7 @@ section must have at least a `query` defining what to file in. queries = { 'count_total': 'SELECT COUNT(*) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite="{suite}" AND s.architecture="{arch}"', - 'scheduled': 'SELECT s.name FROM schedule AS p JOIN sources AS s ON p.package_id=s.id WHERE s.suite="{suite}" AND s.architecture="{arch}" ORDER BY p.date_scheduled', + 'scheduled': 'SELECT (select count(*) from schedule as sch_b where sch.id >= sch_b.id), s.suite, s.architecture, s.name FROM schedule AS sch JOIN sources AS s ON sch.package_id=s.id WHERE sch.date_build_started = "" ORDER BY sch.date_scheduled', 'reproducible_all': 'SELECT s.name FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite="{suite}" AND s.architecture="{arch}" AND r.status="reproducible" ORDER BY r.build_date DESC', 'reproducible_last24h': 'SELECT s.name FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite="{suite}" AND s.architecture="{arch}" AND r.status="reproducible" AND r.build_date > datetime("now", "-24 hours") ORDER BY r.build_date DESC', 'reproducible_last48h': 'SELECT s.name FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite="{suite}" AND s.architecture="{arch}" AND r.status="reproducible" AND r.build_date > datetime("now", "-48 hours") ORDER BY r.build_date DESC', @@ -126,16 +126,6 @@ pages = { } ] }, - 'scheduled': { - 'title': 'Packages in {suite}/{arch} currently scheduled for testing for build reproducibility', - 'body': [ - { - 'query': 'scheduled', - 'text': Template('$tot packages are currently scheduled for testing in $suite/$arch:'), - 'bottom': 'A <a href="/index_scheduled.html">full scheduling overview</a> is also available.' - } - ] - }, 'all_abc': { 'title': 'Overview of reproducible builds in {suite}/{arch} of all tested packages (sorted alphabetically)', 'body': [ @@ -249,7 +239,7 @@ global_pages = { 'body': [ { 'query': 'scheduled', - 'text': Template('$tot packages are currently scheduled for testing in $suite/$arch:') + 'text': Template('$tot packages are currently scheduled for testing:') } ] } @@ -304,19 +294,34 @@ def build_page_section(page, section, suite, arch): if not rows and page != 'scheduled': # there are no package in this set return (html, footnote) # do not output anything on the page. html += build_leading_text_section(section, rows, suite, arch) - html += '<p>\n' + tab + '<code>\n' + if page == 'scheduled': + html += '<p><table class="body">\n' + tab + '<th>#</th><th>suite</th><th>arch</th><th>package</th></tr>\n' + else: + html += '<p>\n' + tab + '<code>\n' for row in rows: - pkg = row[0] - url = RB_PKG_URI + '/' + suite + '/' + arch + '/' + pkg + '.html' - html += tab*2 + '<a href="' + url + '" class="' + if page == 'scheduled': + pkg = row[3] + url = RB_PKG_URI + '/' + row[1] + '/' + row[2] + '/' + pkg + '.html' + html += tab + '<tr><td>' + str(row[0]) + '</td><td>' + row[1] + '</td><td>' + row[2] + '</td><td><code>' + else: + pkg = row[0] + url = RB_PKG_URI + '/' + suite + '/' + arch + '/' + pkg + '.html' + html += tab*2 + html += '<a href="' + url + '" class="' if package_has_notes(pkg): html += 'noted' else: html += 'package' html += '">' + pkg + '</a>' - html += get_trailing_icon(pkg, bugs) + '\n' - html += tab + '</code>\n' - html += '</p>' + html += get_trailing_icon(pkg, bugs) + if page == 'scheduled': + html += '</code></td></tr>' + html += '\n' + if page == 'scheduled': + html += '</table></p>\n' + else: + html += tab + '</code>\n' + html += '</p>' if section.get('bottom'): html += section['bottom'] html = (tab*2).join(html.splitlines(True)) @@ -344,6 +349,8 @@ def build_page(page, suite=None, arch=None): for lsuite in SUITES: for larch in ARCHES: html += build_page_section(page, section, lsuite, larch)[0] + if page == 'scheduled': + break footnote = True else: html1, footnote1 = build_page_section(page, section, suite, arch) |