From: Mark Hymers Date: Wed, 31 Aug 2011 09:42:55 +0000 (+0100) Subject: Merge remote branch 'ansgar/clean-suites' X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=commitdiff_plain;h=6cc75beccd14c9b39621cb5894d67cec24750405;hp=-c Merge remote branch 'ansgar/clean-suites' Signed-off-by: Mark Hymers --- 6cc75beccd14c9b39621cb5894d67cec24750405 diff --combined dak/clean_suites.py index 806549e3,b08c9444..7419b83b --- a/dak/clean_suites.py +++ b/dak/clean_suites.py @@@ -128,6 -128,7 +128,7 @@@ SELECT s.id, s.file, f.filenam (SELECT sa.source FROM src_associations sa) AND s.id NOT IN (SELECT b.source FROM binaries b) + AND s.id NOT IN (SELECT esr.src_id FROM extra_src_references esr) AND f.id NOT IN (SELECT bqf.fileid FROM build_queue_files bqf)""") @@@ -171,6 -172,7 +172,7 @@@ SELECT f.id, f.filename FROM source s, files f, dsc_files df WHERE f.last_used IS NOT NULL AND s.id = df.source AND df.file = f.id AND ((EXISTS (SELECT 1 FROM src_associations sa WHERE sa.source = s.id)) + OR (EXISTS (SELECT 1 FROM extra_src_references esr WHERE esr.src_id = s.id)) OR (EXISTS (SELECT 1 FROM binaries b WHERE b.source = s.id)) OR (EXISTS (SELECT 1 FROM build_queue_files bqf WHERE bqf.fileid = s.file)))""") @@@ -424,7 -426,7 +426,7 @@@ def main() max_delete = int(cnf["Clean-Suites::Options::Maximum"]) if max_delete < 1: utils.fubar("If given, Maximum must be at least 1") - except ValueError, e: + except ValueError as e: utils.fubar("If given, Maximum must be an integer") else: max_delete = None