diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-03-13 16:12:18 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-03-13 16:12:18 +0100 |
commit | ad6ede5d04a2db29dd0a6889bb84559e6a0945f0 (patch) | |
tree | 02fab3d1a0210e8c13cc089cf17ad14269c19b69 | |
parent | 9c2d8201530f69716f0a703ea86d30af07823fbf (diff) | |
download | jenkins.debian.net-ad6ede5d04a2db29dd0a6889bb84559e6a0945f0.tar.xz |
reproducible: refactor, consider suites
-rwxr-xr-x | bin/reproducible_html_notes.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index df0c1f01..44efff0d 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -283,15 +283,15 @@ def purge_old_notes(notes): os.remove(NOTES_PATH + '/' + page) removed_pages.append(pkg) for pkg in removed_pages: - try: - # FIXME: this needs to be s_suite in suites - query = 'SELECT s.name ' + \ - 'FROM results AS r JOIN sources AS s ON r.package_id=s.id ' + \ - 'WHERE s.name="{pkg}" AND r.status != "" AND s.suite="sid"' - query = query.format(pkg=pkg) - to_rebuild.append(query_db(query)[0][0]) - except IndexError: # the package is not tested. this can happen if - pass # a package got removed from the archive + for suite in SUITES: + try: + query = 'SELECT s.name ' + \ + 'FROM results AS r JOIN sources AS s ON r.package_id=s.id ' + \ + 'WHERE s.name="{pkg}" AND r.status != "" AND s.suite="{suite}"' + query = query.format(pkg=pkg, suite=suite) + to_rebuild.append(query_db(query)[0][0]) + except IndexError: # the package is not tested. this can happen if + pass # a package got removed from the archive if to_rebuild: gen_packages_html(to_rebuild) |