- filename = "%s/dists/%s/%s/binary-%s/Packages" % (Cnf["Dir::Root"], suites[0], component, architecture)
- packages = utils.open_file(filename, "r")
+ filename = "%s/dists/%s/%s/binary-%s/Packages.gz" % (Cnf["Dir::Root"], suites[0], component, architecture)
+ # apt_pkg.ParseTagFile needs a real file handle and can't handle a GzipFile instance...
+ 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);
+ packages = utils.open_file(temp_filename);