X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=dak%2Fcruft_report.py;h=f7650f986267f2b70ac40b8b7ef5590addfb7f52;hb=86121fc4c31594dc1c184ee2ab7979dd11cd5aa3;hp=5b199dcab8de5756ec347f9ef96f349f63ae8025;hpb=efe39a90214db10e0a993a2aa2d236edcae46016;p=dak.git diff --git a/dak/cruft_report.py b/dak/cruft_report.py index 5b199dca..f7650f98 100755 --- a/dak/cruft_report.py +++ b/dak/cruft_report.py @@ -58,7 +58,7 @@ def usage(exit_code=0): Check for obsolete or duplicated packages. -h, --help show this help and exit. - -m, --mode=MODE chose the MODE to run in (full or daily). + -m, --mode=MODE chose the MODE to run in (full, daily, bdo). -s, --suite=SUITE check suite SUITE. -w, --wanna-build-dump where to find the copies of http://buildd.debian.org/stats/*.txt""" sys.exit(exit_code) @@ -538,8 +538,10 @@ def main (): checks = [ "nbs", "nviu", "nvit", "obsolete source", "nfu" ] elif Options["Mode"] == "full": checks = [ "nbs", "nviu", "nvit", "obsolete source", "nfu", "dubious nbs", "bnb", "bms", "anais" ] + elif Options["Mode"] == "bdo": + checks = [ "nbs", "obsolete source" ] else: - utils.warn("%s is not a recognised mode - only 'full' or 'daily' are understood." % (Options["Mode"])) + utils.warn("%s is not a recognised mode - only 'full', 'daily' or 'bdo' are understood." % (Options["Mode"])) usage(1) session = DBConn().session() @@ -556,6 +558,9 @@ def main (): nfu_packages = {} suite = get_suite(Options["Suite"].lower(), session) + if not suite: + utils.fubar("Cannot find suite %s" % Options["Suite"].lower()) + suite_id = suite.suite_id suite_name = suite.suite_name.lower()