X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fcruft_report.py;h=7dedceed886c1c9f4c11c0e3fab4db0389147764;hb=f601bd71e61c6c265b5fa1f296a5258385e6f154;hp=6d7db38512fe7b2a061a83384ff89fe3d3d9445a;hpb=b75dfc8de939b6cf25010de396644a56990d720f;p=dak.git diff --git a/dak/cruft_report.py b/dak/cruft_report.py index 6d7db385..7dedceed 100755 --- a/dak/cruft_report.py +++ b/dak/cruft_report.py @@ -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 \