X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fcruft_report.py;h=5b199dcab8de5756ec347f9ef96f349f63ae8025;hb=d2c137e3f9de671121ae9bc216a1dc1a86cdbcaa;hp=c691bb22609b113f8ed7f98b8efcc2f702af31c9;hpb=d8eb64b3baff23bd2a9dab27df401c86cfbcbcfa;p=dak.git diff --git a/dak/cruft_report.py b/dak/cruft_report.py index c691bb22..5b199dca 100755 --- a/dak/cruft_report.py +++ b/dak/cruft_report.py @@ -35,19 +35,6 @@ Check for obsolete binary packages ################################################################################ -import warnings -warnings.filterwarnings('ignore', \ - "apt_pkg\.ParseTagFile\(\) is deprecated\. Please see apt_pkg\.TagFile\(\) for the replacement\.", \ - DeprecationWarning) -warnings.filterwarnings('ignore', \ - "Attribute '.*' of the 'apt_pkg\.TagFile' object is deprecated, use '.*' instead\.", \ - DeprecationWarning) -warnings.filterwarnings('ignore', \ - "Attribute 'Find' of the 'apt_pkg\.TagSection' object is deprecated, use 'find' instead\.", \ - DeprecationWarning) - -################################################################################ - import commands, os, sys, re import apt_pkg @@ -531,7 +518,8 @@ def main (): for i in [ "help" ]: if not cnf.has_key("Cruft-Report::Options::%s" % (i)): cnf["Cruft-Report::Options::%s" % (i)] = "" - cnf["Cruft-Report::Options::Suite"] = cnf["Dinstall::DefaultSuite"] + + cnf["Cruft-Report::Options::Suite"] = cnf.get("Dinstall::DefaultSuite", "unstable") if not cnf.has_key("Cruft-Report::Options::Mode"): cnf["Cruft-Report::Options::Mode"] = "daily" @@ -583,7 +571,7 @@ def main (): bins_in_suite = get_suite_binaries(suite, session) # Checks based on the Sources files - components = cnf.ValueList("Suite::%s::Components" % (suite_name)) + components = get_component_names(session) for component in components: filename = "%s/dists/%s/%s/source/Sources.gz" % (cnf["Dir::Root"], suite_name, component) # apt_pkg.ParseTagFile needs a real file handle and can't handle a GzipFile instance...