X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=blobdiff_plain;f=dak%2Fcruft_report.py;h=a960a686717cbedf881d07317cad2078e08aa4ab;hp=98381bc1952fd6199aa32e1ea5cf21d157216543;hb=2a10967af5974e4fa513d029fb995e122d90501a;hpb=aa4f71d8e30c23e458a8148be258c89bffbd405f diff --git a/dak/cruft_report.py b/dak/cruft_report.py index 98381bc1..a960a686 100755 --- a/dak/cruft_report.py +++ b/dak/cruft_report.py @@ -61,7 +61,7 @@ Check for obsolete or duplicated packages. -m, --mode=MODE chose the MODE to run in (full, daily, bdo). -s, --suite=SUITE check suite SUITE. -R, --rdep-check check reverse dependencies - -w, --wanna-build-dump where to find the copies of http://buildd.debian.org/stats/*.txt""" + -w, --wanna-build-dump where to find the copies of https://buildd.debian.org/stats/*.txt""" sys.exit(exit_code) ################################################################################ @@ -244,7 +244,7 @@ def reportWithoutSource(suite_name, suite_id, session, rdeps=False): print " dak rm -m %s -s %s -a all -p -R -b %s" % \ (message, suite_name, package) if rdeps: - if utils.check_reverse_depends([package], suite_name, ["all"], session, True): + if utils.check_reverse_depends([package], suite_name, [], session, True): print else: print " - No dependency problem found\n" @@ -681,19 +681,19 @@ def main (): components = get_component_names(session) for component in components: filename = "%s/dists/%s/%s/source/Sources.gz" % (suite.archive.path, suite_name, component) - # apt_pkg.ParseTagFile needs a real file handle and can't handle a GzipFile instance... + # apt_pkg.TagFile needs a real file handle and can't handle a GzipFile instance... (fd, temp_filename) = utils.temp_filename() (result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename)) if (result != 0): sys.stderr.write("Gunzip invocation failed!\n%s\n" % (output)) sys.exit(result) sources = utils.open_file(temp_filename) - Sources = apt_pkg.ParseTagFile(sources) - while Sources.Step(): - source = Sources.Section.Find('Package') - source_version = Sources.Section.Find('Version') - architecture = Sources.Section.Find('Architecture') - binaries = Sources.Section.Find('Binary') + Sources = apt_pkg.TagFile(sources) + while Sources.step(): + source = Sources.section.find('Package') + source_version = Sources.section.find('Version') + architecture = Sources.section.find('Architecture') + binaries = Sources.section.find('Binary') binaries_list = [ i.strip() for i in binaries.split(',') ] if "bnb" in checks: @@ -730,7 +730,7 @@ def main (): if component == 'main/debian-installer' and re.match("kfreebsd", architecture): continue filename = "%s/dists/%s/%s/binary-%s/Packages.gz" % (suite.archive.path, suite_name, component, architecture) - # apt_pkg.ParseTagFile needs a real file handle + # apt_pkg.TagFile needs a real file handle (fd, temp_filename) = utils.temp_filename() (result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename)) if (result != 0): @@ -742,11 +742,11 @@ def main (): nfu_entries = parse_nfu(architecture) packages = utils.open_file(temp_filename) - Packages = apt_pkg.ParseTagFile(packages) - while Packages.Step(): - package = Packages.Section.Find('Package') - source = Packages.Section.Find('Source', "") - version = Packages.Section.Find('Version') + Packages = apt_pkg.TagFile(packages) + while Packages.step(): + package = Packages.section.find('Package') + source = Packages.section.find('Source', "") + version = Packages.section.find('Version') if source == "": source = package if bin2source.has_key(package) and \