diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-02-02 19:37:50 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-02-02 23:00:18 +0100 |
commit | df9e5c454b3ffcf97fc3ab144e337d2c5224b1ae (patch) | |
tree | 0c50a73a6e34c11be1b7dcc0cb68b419899f8271 /bin | |
parent | 2ded947a56d5be2454afec053b4771d5f40f5a49 (diff) | |
download | jenkins.debian.net-df9e5c454b3ffcf97fc3ab144e337d2c5224b1ae.tar.xz |
reproducible: rebuild relevant package pages also when we remove a note
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_html_notes.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |