"""
filename = "%s/dists/%s/%s/source/Sources.gz" % (Cnf["Dir::Root"], suite, component)
print "Processing %s..." % (filename)
- # 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)
+ Sources = apt_pkg.TagFile(sources)
while Sources.Step():
source = Sources.Section.Find('Package')
directory = Sources.Section.Find('Directory')
filename = "%s/dists/%s/%s/binary-%s/Packages.gz" \
% (Cnf["Dir::Root"], suite, component, architecture)
print "Processing %s..." % (filename)
- # 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)
packages = utils.open_file(temp_filename)
- Packages = apt_pkg.ParseTagFile(packages)
+ Packages = apt_pkg.TagFile(packages)
while Packages.Step():
filename = "%s/%s" % (Cnf["Dir::Root"], Packages.Section.Find('Filename'))
if not os.path.exists(filename):
field = dsc.get(field_name)
if field:
try:
- apt_pkg.ParseSrcDepends(field)
+ apt_pkg.parse_src_depends(field)
except:
print "E: [%s] %s: %s" % (filename, field_name, field)
pass
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)
+ Sources = apt_pkg.TagFile(sources)
while Sources.Step():
source = Sources.Section.Find('Package')
source_version = Sources.Section.Find('Version')
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):
nfu_entries = parse_nfu(architecture)
packages = utils.open_file(temp_filename)
- Packages = apt_pkg.ParseTagFile(packages)
+ Packages = apt_pkg.TagFile(packages)
while Packages.Step():
package = Packages.Section.Find('Package')
source = Packages.Section.Find('Source', "")
dep_list = Packages.Section.Find("Depends")
if dep_list:
if package_name == package:
- for d in apt_pkg.ParseDepends(dep_list):
+ for d in apt_pkg.parse_depends(dep_list):
for i in d:
depends.add(i[0])
else:
- for d in apt_pkg.ParseDepends(dep_list):
+ for d in apt_pkg.parse_depends(dep_list):
for i in d:
if i[0] == package:
rdepends.add(package_name)
if Options['package'] and package != Options['package']:
continue
if dep_list:
- for d in apt_pkg.ParseDepends(dep_list):
+ for d in apt_pkg.parse_depends(dep_list):
for i in d:
if not depends.has_key(package):
depends[package] = set()
homedir = os.getenv("HOME")
confpath = os.path.join(homedir, "/etc/dak.conf")
if os.path.exists(confpath):
- apt_pkg.ReadConfigFileISC(Cnf,confpath)
+ apt_pkg.read_config_file_isc(Cnf,confpath)
# We are still in here, so there is no local config file or we do
# not allow local files. Do the normal stuff.
if (result != 0):
fubar("Gunzip invocation failed!\n%s\n" % (output), result)
packages = open_file(temp_file)
- Packages = apt_pkg.ParseTagFile(packages)
+ Packages = apt_pkg.TagFile(packages)
os.unlink(temp_file)
return Packages
if package in removals: continue
parsed_dep = []
try:
- parsed_dep += apt_pkg.ParseDepends(deps[package])
+ parsed_dep += apt_pkg.parse_depends(deps[package])
except ValueError as e:
print "Error for package %s: %s" % (package, e)
for dep in parsed_dep:
# Remove [arch] information since we want to see breakage on all arches
build_dep = re_build_dep_arch.sub("", build_dep)
try:
- parsed_dep += apt_pkg.ParseDepends(build_dep)
+ parsed_dep += apt_pkg.parse_depends(build_dep)
except ValueError as e:
print "Error for source %s: %s" % (source, e)
for dep in parsed_dep: