From ad6ede5d04a2db29dd0a6889bb84559e6a0945f0 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 13 Mar 2015 16:12:18 +0100 Subject: reproducible: refactor, consider suites --- bin/reproducible_html_notes.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'bin/reproducible_html_notes.py') 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) -- cgit v1.2.3-70-g09d2