"""
for suite in [ "stable", "testing", "unstable" ]:
for component in Cnf.ValueList("Suite::%s::Components" % (suite)):
- architectures = get_suite_architectures(suite)
+ architectures = database.get_suite_architectures(suite)
for arch in [ i.lower() for i in architectures ]:
if arch == "source":
validate_sources(suite, component)
suite = "stable"
stable = {}
components = Cnf.ValueList("Suite::%s::Components" % (suite))
- architectures = filter(utils.real_arch, get_suite_architectures(suite))
+ architectures = filter(utils.real_arch, database.get_suite_architectures(suite))
for component in components:
for architecture in architectures:
filename = "%s/dists/%s/%s/binary-%s/Packages" % (Cnf["Dir::Root"], suite, component, architecture)
arch_all_id = database.get_architecture_id("all")
dsc_type_id = database.get_override_type_id("dsc")
- for arch in get_suite_architectures(src_suite_id):
+ for arch in database.get_suite_architectures(src_suite_id):
if arch == "source":
continue
if suite != "experimental":
check_components.append('main/debian-installer');
for component in check_components:
- architectures = filter(utils.real_arch, get_suite_architectures(suite))
+ architectures = filter(utils.real_arch, database.get_suite_architectures(suite))
for architecture in architectures:
filename = "%s/dists/%s/%s/binary-%s/Packages.gz" % (Cnf["Dir::Root"], suite, component, architecture)
# apt_pkg.ParseTagFile needs a real file handle
for i in ("Version", "Origin", "Description"):
if SubSec.has_key(i):
projectB.query("UPDATE suite SET %s = '%s' WHERE suite_name = '%s'" % (i.lower(), SubSec[i], suite.lower()))
- for architecture in get_suite_architectures(suite):
+ for architecture in database.get_suite_architectures(suite):
architecture_id = database.get_architecture_id (architecture)
projectB.query("INSERT INTO suite_architectures (suite, architecture) VALUES (currval('suite_id_seq'), %d)" % (architecture_id))
udeb_components = map(lambda x: x+"/debian-installer",
Cnf.ValueList("Suite::%s::UdebComponents" % suite))
for component in Cnf.SubTree("Component").List() + udeb_components:
- architectures = filter(utils.real_arch, get_suite_architectures(suite))
+ architectures = filter(utils.real_arch, database.get_suite_architectures(suite))
for architecture in architectures:
packages = Cnf["Dir::Root"] + "dists/" + Cnf["Suite::%s::CodeName" % (suite)] + '/' + component + '/binary-' + architecture + '/Packages'
print 'Processing '+packages+'...'
projectB.query("INSERT INTO suite (suite_name, version, origin, "
"description) VALUES ('%s', %s, %s, %s)"
% (suite.lower(), version, origin, description))
- for architecture in get_suite_architectures(suite):
+ for architecture in database.get_suite_architectures(suite):
architecture_id = database.get_architecture_id (architecture)
if architecture_id < 0:
utils.fubar("architecture '%s' not found in architecture"
else:
binary_types = [ "deb" ]
if not Options["Architecture"]:
- architectures = get_suite_architectures(suite)
+ architectures = database.get_suite_architectures(suite)
else:
architectures = utils.split_args(Options["Architectures"])
for arch in [ i.lower() for i in architectures ]:
ver, suite)
adv += "%s\n%s\n\n" % (suite_header, "-"*len(suite_header))
- arches = get_suite_architectures(suite)
+ arches = database.get_suite_architectures(suite)
if "source" in arches:
arches.remove("source")
if "all" in arches:
(source, dest) = args[1:3]
if changes["distribution"].has_key(source):
for arch in changes["architecture"].keys():
- if arch not in get_suite_architectures(source):
+ if arch not in database.get_suite_architectures(source):
reject("Mapping %s to %s for unreleased architecture %s." % (source, dest, arch),"")
del changes["distribution"][source]
changes["distribution"][dest] = 1
default_suite = Cnf.get("Dinstall::DefaultSuite", "Unstable")
architecture = control.Find("Architecture")
upload_suite = changes["distribution"].keys()[0]
- if architecture not in get_suite_architectures(default_suite) and architecture not in get_suite_architectures(upload_suite):
+ if architecture not in database.get_suite_architectures(default_suite) and architecture not in database.get_suite_architectures(upload_suite):
reject("Unknown architecture '%s'." % (architecture))
# Ensure the architecture of the .deb is one of the ones
if arches:
all_arches = set(arches)
else:
- all_arches = set(get_suite_architectures(suites[0]))
+ all_arches = set(database.get_suite_architectures(suites[0]))
all_arches -= set(["source", "all"])
for architecture in all_arches:
deps = {}
for suite in suite_list:
suite_id = suite_ids[suite]
suite_arches[suite_id] = {}
- for arch in get_suite_architectures(suite):
+ for arch in database.get_suite_architectures(suite):
suite_arches[suite_id][arch] = ""
suite_id_list.append(suite_id)
output_list = [ output_format(i) for i in suite_list ]