From 307a65506f903959b18024c54147cfce8d72bbf6 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 9 Dec 2015 17:25:23 +0100 Subject: reproducible: refactor and better point out notes.git --- bin/reproducible_html_notes.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index 2a4746db..ec44ae1e 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -19,6 +19,8 @@ from reproducible_html_indexes import build_page NOTES = 'packages.yml' ISSUES = 'issues.yml' +NOTESGIT_DESCRIPTION = 'Our notes about issues affecting packages are stored in notes.git and are targeted at packages in Debian in \'unstable/amd64\' (unless they say otherwise).' + note_html = Template((tab*2).join(""" @@ -32,7 +34,7 @@ note_html = Template((tab*2).join(""" @@ -150,7 +152,9 @@ $affected_pkgs

- Notes are stored in notes.git and are targeted at packages in 'unstable/amd64' (unless they say otherwise). + $notesgit_description

 
-

Notes are stored in notes.git and are targeted at packages in 'unstable/amd64' (unless they say otherwise).

+

+ $notesgit_description +

""".splitlines(True))) @@ -240,11 +244,11 @@ def gen_html_note(package, note): comment = comment.replace('\n', '
') infos += note_comments_html.substitute(comments=comment) try: - return note_html.substitute(version=str(note['version']), infos=infos) + return note_html.substitute(version=str(note['version']), infos=infos, notesgit_description=NOTESGIT_DESCRIPTION) except KeyError: log.warning('You should really include a version in the ' + str(note['package']) + ' note') - return note_html.substitute(version='N/A', infos=infos) + return note_html.substitute(version='N/A', infos=infos, notesgit_description=NOTESGIT_DESCRIPTION) def gen_html_issue(issue, suite): @@ -297,7 +301,8 @@ def gen_html_issue(issue, suite): desc = desc.replace('\n', '
') return issue_html.substitute(issue=issue, urls=url, description=desc, affected_pkgs=affected, - suite=suite, suite_links=suite_links) + suite=suite, suite_links=suite_links, + notesgit_description=NOTESGIT_DESCRIPTION) def purge_old_notes(notes): @@ -410,7 +415,7 @@ def index_issues(issues): str(len([x for x in notes if notes[x].get('issues')])) + \ ' packages categorized in ' + str(len(issues)) + \ ' issues.

' - html += tab*2 + '

Notes are stored in notes.git and are targeted at packages in \'unstable/amd64\' (unless they say otherwise).

' + html += tab*2 + '

' + NOTESGIT_DESCRIPTION + '

' title = 'Known issues related to reproducible builds' destfile = BASE + '/index_issues.html' desturl = REPRODUCIBLE_URL + '/index_issues.html' -- cgit v1.2.3-70-g09d2