From: Joerg Jaspert Date: Thu, 19 Feb 2009 21:51:05 +0000 (+0100) Subject: get_suite_architectures X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b840ef0761e8b91bdec102b60b3bf09137627117;p=dak get_suite_architectures its database.get_suite_architectures everywhere Signed-off-by: Joerg Jaspert --- diff --git a/dak/check_archive.py b/dak/check_archive.py index 01876120..f7230b00 100755 --- a/dak/check_archive.py +++ b/dak/check_archive.py @@ -412,7 +412,7 @@ def check_indices_files_exist(): """ 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) diff --git a/dak/check_proposed_updates.py b/dak/check_proposed_updates.py index 57d068a3..f12df878 100755 --- a/dak/check_proposed_updates.py +++ b/dak/check_proposed_updates.py @@ -242,7 +242,7 @@ def parse_packages(): 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) diff --git a/dak/compare_suites.py b/dak/compare_suites.py index 22b00101..01652d94 100755 --- a/dak/compare_suites.py +++ b/dak/compare_suites.py @@ -67,7 +67,7 @@ def main (): 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 diff --git a/dak/cruft_report.py b/dak/cruft_report.py index 19b02172..3c3d73cb 100755 --- a/dak/cruft_report.py +++ b/dak/cruft_report.py @@ -426,7 +426,7 @@ def main (): 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 diff --git a/dak/import_archive.py b/dak/import_archive.py index d61a1a19..3e5100be 100755 --- a/dak/import_archive.py +++ b/dak/import_archive.py @@ -254,7 +254,7 @@ def update_suites (): 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)) @@ -570,7 +570,7 @@ Please read the documentation before running this script. 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+'...' diff --git a/dak/init_db.py b/dak/init_db.py index 8f757a36..d6a7ebfb 100755 --- a/dak/init_db.py +++ b/dak/init_db.py @@ -135,7 +135,7 @@ def do_suite(): 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" diff --git a/dak/make_suite_file_list.py b/dak/make_suite_file_list.py index 3f05de3a..941c7370 100755 --- a/dak/make_suite_file_list.py +++ b/dak/make_suite_file_list.py @@ -296,7 +296,7 @@ def write_filelists(packages, dislocated_files): 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 ]: diff --git a/dak/new_security_install.py b/dak/new_security_install.py index 7858fd0e..d674befd 100755 --- a/dak/new_security_install.py +++ b/dak/new_security_install.py @@ -386,7 +386,7 @@ def generate_advisory(template): 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: diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index 4c87a17a..2e60435d 100755 --- a/dak/process_unchecked.py +++ b/dak/process_unchecked.py @@ -289,7 +289,7 @@ def check_distributions(): (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 @@ -451,7 +451,7 @@ def check_files(): 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 diff --git a/dak/rm.py b/dak/rm.py index 6a76eb78..903e138e 100755 --- a/dak/rm.py +++ b/dak/rm.py @@ -100,7 +100,7 @@ def reverse_depends_check(removals, suites, arches=None): 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 = {} diff --git a/dak/stats.py b/dak/stats.py index d8bf457f..a9585545 100755 --- a/dak/stats.py +++ b/dak/stats.py @@ -179,7 +179,7 @@ SELECT suite, count(suite) FROM src_associations GROUP BY suite;""") 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 ]