# Copyright (C) 2001, 2002, 2004, 2006 James Troup <james@nocrew.org>
# This program is free software; you can redistribute it and/or modify
# Copyright (C) 2001, 2002, 2004, 2006 James Troup <james@nocrew.org>
# This program is free software; you can redistribute it and/or modify
if stable[dep].has_key(arch):
if apt_pkg.CheckDep(stable[dep][arch], constraint, version):
if Options["debug"]:
if stable[dep].has_key(arch):
if apt_pkg.CheckDep(stable[dep][arch], constraint, version):
if Options["debug"]:
dep_filename = "%s_%s_%s.deb" % (dep, epochless_version, arch)
if files.has_key(dep_filename):
if Options["debug"]:
dep_filename = "%s_%s_%s.deb" % (dep, epochless_version, arch)
if files.has_key(dep_filename):
if Options["debug"]:
if stable.has_key(dep):
if stable[dep].has_key(arch):
error += "%s:%s:%s" % (dep, arch, stable[dep][arch])
if stable.has_key(dep):
if stable[dep].has_key(arch):
error += "%s:%s:%s" % (dep, arch, stable[dep][arch])
- sys.stderr.write("MWAAP! %s: '%s' %s can not be satisifed:\n" % (filename, daklib.utils.pp_deps(parsed_dep), dep_type))
+ sys.stderr.write("MWAAP! %s: '%s' %s can not be satisifed:\n" % (filename, utils.pp_deps(parsed_dep), dep_type))
################################################################################
def check_changes (filename):
################################################################################
def check_changes (filename):
- changes = daklib.utils.parse_changes(filename)
- files = daklib.utils.build_file_list(changes)
+ changes = utils.parse_changes(filename)
+ files = utils.build_file_list(changes)
+ except ChangesUnicodeError:
+ utils.warn("Improperly encoded changes file, not utf-8")
+ return
################################################################################
def check_joey (filename):
################################################################################
def check_joey (filename):
for line in f.readlines():
line = line.rstrip()
if line.find('install') != -1:
split_line = line.split()
if len(split_line) != 2:
for line in f.readlines():
line = line.rstrip()
if line.find('install') != -1:
split_line = line.split()
if len(split_line) != 2:
install_type = split_line[0]
if install_type not in [ "install", "install-u", "sync-install" ]:
install_type = split_line[0]
if install_type not in [ "install", "install-u", "sync-install" ]:
- components = Cnf.ValueList("Suite::%s::Components" % (suite))
- architectures = filter(daklib.utils.real_arch, Cnf.ValueList("Suite::%s::Architectures" % (suite)))
+ components = cnf.ValueList("Suite::%s::Components" % (suite))
+ architectures = [ a.arch_string for a in get_suite_architectures(suite, skipsrc=True, skipall=True) ]
- filename = "%s/dists/%s/%s/binary-%s/Packages" % (Cnf["Dir::Root"], suite, component, architecture)
- packages = daklib.utils.open_file(filename, 'r')
+ filename = "%s/dists/%s/%s/binary-%s/Packages" % (cnf["Dir::Root"], suite, component, architecture)
+ packages = utils.open_file(filename, 'r')
Arguments = [('d', "debug", "Check-Proposed-Updates::Options::Debug"),
('q',"quiet","Check-Proposed-Updates::Options::Quiet"),
('v',"verbose","Check-Proposed-Updates::Options::Verbose"),
('h',"help","Check-Proposed-Updates::Options::Help")]
for i in [ "debug", "quiet", "verbose", "help" ]:
Arguments = [('d', "debug", "Check-Proposed-Updates::Options::Debug"),
('q',"quiet","Check-Proposed-Updates::Options::Quiet"),
('v',"verbose","Check-Proposed-Updates::Options::Verbose"),
('h',"help","Check-Proposed-Updates::Options::Help")]
for i in [ "debug", "quiet", "verbose", "help" ]:
- if not Cnf.has_key("Check-Proposed-Updates::Options::%s" % (i)):
- Cnf["Check-Proposed-Updates::Options::%s" % (i)] = ""
+ if not cnf.has_key("Check-Proposed-Updates::Options::%s" % (i)):
+ cnf["Check-Proposed-Updates::Options::%s" % (i)] = ""
- arguments = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv)
- Options = Cnf.SubTree("Check-Proposed-Updates::Options")
+ arguments = apt_pkg.ParseCommandLine(cnf.Cnf, Arguments, sys.argv)
+ Options = cnf.SubTree("Check-Proposed-Updates::Options")