From df9e5c454b3ffcf97fc3ab144e337d2c5224b1ae Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 2 Feb 2015 19:37:50 +0100 Subject: reproducible: rebuild relevant package pages also when we remove a note --- bin/reproducible_html_notes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index 48310da8..4d3ed333 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -245,6 +245,7 @@ def gen_html_issue(issue): affected_pkgs=affected) def purge_old_notes(notes): + removed_pages = [] presents = sorted(os.listdir(NOTES_PATH)) for page in presents: pkg = page.rsplit('_', 1)[0] @@ -252,6 +253,9 @@ def purge_old_notes(notes): if pkg not in notes: log.info('There are no notes for ' + pkg + '. Removing old page.') os.remove(NOTES_PATH + '/' + page) + removed_pages.append(pkg) + if removed_pages: + process_packages(removed_pages) def iterate_over_notes(notes): num_notes = str(len(notes)) @@ -271,7 +275,6 @@ def iterate_over_notes(notes): desturl = REPRODUCIBLE_URL + NOTES_URI + '/' + package + '_note.html' log.info("you can now see your notes at " + desturl) i = i + 1 - process_packages(notes) # regenerate all rb-pkg/ pages def iterate_over_issues(issues): num_issues = str(len(issues)) @@ -366,3 +369,4 @@ if __name__ == '__main__': index_issues(issues) index_notes(notes) purge_old_notes(notes) + process_packages(notes) # regenerate all rb-pkg/ pages -- cgit v1.2.3-70-g09d2