X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Foverride.py;h=13a277dbdc542e5de65b85a291a0befe0ae739f7;hb=c9dc404548a6001e8bbf7908a31a2992b3d4d78c;hp=6d5b82e890852c52e62e3c3b808cc66109711f80;hpb=4f393b8325e9e881cfc12618a06816a4e2c8dfb9;p=dak.git diff --git a/dak/override.py b/dak/override.py index 6d5b82e8..13a277db 100755 --- a/dak/override.py +++ b/dak/override.py @@ -28,7 +28,6 @@ import os import sys import apt_pkg -import commands from daklib.config import Config from daklib.dbconn import * @@ -50,7 +49,7 @@ def usage (exit_code=0): Make microchanges or microqueries of the binary overrides -h, --help show this help and exit - -c, --check chech override compliance + -c, --check check override compliance -d, --done=BUG# send priority/section change as closure to bug# -n, --no-action don't do anything -s, --suite specify the suite to use @@ -67,18 +66,7 @@ def check_override_compliance(package, priority, suite, cnf, session): arches -= set(["source", "all"]) for arch in arches: for component in components: - filename = "%s/dists/%s/%s/binary-%s/Packages.gz" % (cnf["Dir::Root"], suite, component, arch) - (fd, temp_filename) = utils.temp_filename() - (result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename)) - if (result != 0): - utils.fubar("Gunzip invocation failed!\n%s\n" % (output), result) - filename = "%s/dists/%s/%s/debian-installer/binary-%s/Packages.gz" % (cnf["Dir::Root"], suite, component, arch) - if os.path.exists(filename): - (result, output) = commands.getstatusoutput("gunzip -c %s >> %s" % (filename, temp_filename)) - if (result != 0): - utils.fubar("Gunzip invocation failed!\n%s\n" % (output), result) - packages = utils.open_file(temp_filename) - Packages = apt_pkg.ParseTagFile(packages) + Packages = utils.get_packages_from_ftp(cnf['Dir::Root'], suite, component, arch) while Packages.Step(): package_name = Packages.Section.Find("Package") dep_list = Packages.Section.Find("Depends") @@ -92,7 +80,6 @@ def check_override_compliance(package, priority, suite, cnf, session): for i in d: if i[0] == package: rdepends.add(package_name) - os.unlink(temp_filename) query = """SELECT o.package, p.level, p.priority FROM override o