From 8fdc9f19f8338c90d9bb73732f97e8ff1bf1bd6d Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 11 Sep 2015 01:11:18 +0200 Subject: reproducible: create scheduled indexes as part of the live_status job (and 'ignore bugs') --- bin/reproducible_html_live_status.py | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'bin/reproducible_html_live_status.py') diff --git a/bin/reproducible_html_live_status.py b/bin/reproducible_html_live_status.py index 434c4096..98bf3b23 100755 --- a/bin/reproducible_html_live_status.py +++ b/bin/reproducible_html_live_status.py @@ -9,6 +9,35 @@ # from reproducible_common import * +from reproducible_html_indexes import build_leading_text_section + +def generate_schedule(arch): + """ the schedule pages are very different than others index pages """ + log.info('Building the schedule index page for ' + arch + '...') + title = 'Packages currently scheduled on ' + arch + ' for testing for build reproducibility' + query = 'SELECT sch.date_scheduled, 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 = "" AND s.architecture="{arch}" ORDER BY sch.date_scheduled' + text = Template('$tot packages are currently scheduled for testing on $arch:') + html = '' + rows = query_db(query.format(arch=arch)) + html += build_leading_text_section({'text': text}, rows, defaultsuite, arch) + html += '

\n' + tab + html += '' + html += '\n' + for row in rows: + # 0: date_scheduled, 1: suite, 2: arch, 3: pkg name + pkg = row[3] + html += tab + '' + html += '\n' + html += '
#scheduled atsuitearchitecturesource package
 ' + row[0] + '' + row[1] + '' + row[2] + '' + html += link_package(pkg, row[1], row[2], bugs) + html += '

\n' + destfile = BASE + '/index_' + arch + '_scheduled.html' + desturl = REPRODUCIBLE_URL + '/index_' + arch + '_scheduled.html' + write_html_page(title=title, body=html, destfile=destfile) + log.info("Page generated at " + desturl) + def generate_live_status(): """ the schedule pages are very different than others index pages """ @@ -44,8 +73,10 @@ def generate_live_status(): destfile = BASE + '/live_status.html' desturl = REPRODUCIBLE_URL + '/live_status.html' write_html_page(title=title, body=html, destfile=destfile) - log.info("Package page generated at " + desturl) + log.info("Page generated at " + desturl) if __name__ == '__main__': generate_live_status() + for arch in ARCHS: + generate_schedule(arch) -- cgit v1.2.3-70-g09d2