]> err.no Git - dak/commitdiff
get_suite_architectures
authorJoerg Jaspert <joerg@debian.org>
Thu, 19 Feb 2009 21:51:05 +0000 (22:51 +0100)
committerJoerg Jaspert <joerg@debian.org>
Thu, 19 Feb 2009 21:51:05 +0000 (22:51 +0100)
its database.get_suite_architectures everywhere

Signed-off-by: Joerg Jaspert <joerg@debian.org>
dak/check_archive.py
dak/check_proposed_updates.py
dak/compare_suites.py
dak/cruft_report.py
dak/import_archive.py
dak/init_db.py
dak/make_suite_file_list.py
dak/new_security_install.py
dak/process_unchecked.py
dak/rm.py
dak/stats.py

index 018761207a75ee23442145d303edb5fb5ffb621d..f7230b00ee51608cb7a8ca46cff3a5cf74f88ac5 100755 (executable)
@@ -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)
index 57d068a3401427a2ee91e0c0b78cd8d43aff3bb9..f12df878948113576715d94d768f7d5839c3a2a6 100755 (executable)
@@ -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)
index 22b00101b15e40716b471ffb9806140820b55344..01652d94fc953a93a2c58e5b53624f3c5a0c5a50 100755 (executable)
@@ -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
 
index 19b0217206d2ea15dae5121568eb23c16b319e8f..3c3d73cb8c5dbb58038f807b7d19f84d823fa574 100755 (executable)
@@ -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
index d61a1a19704e203feec8d012d509d765d34ca140..3e5100be467c6e5efea85c8835bc614e61363a33 100755 (executable)
@@ -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+'...'
index 8f757a36fbeaafb2e49a1685d46806dceb9e5e9f..d6a7ebfb5710c5bb05edcc541cc6487fc0365268 100755 (executable)
@@ -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"
index 3f05de3aa5ee18fd984930be60710831ab8df074..941c73707e7cce26a4ee9abd787e3253a60c3e92 100755 (executable)
@@ -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 ]:
index 7858fd0edf22c4a2cc51224a2df6050cbc68c384..d674befd4f6a639f5f35d62bacf32a691687f650 100755 (executable)
@@ -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:
index 4c87a17a80a10f55a082325e6e113f71ed73da37..2e60435d1de032578c105dd20ee7bca8a1e20675 100755 (executable)
@@ -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
index 6a76eb78364a6615a32ea3bf30f48555e29e1351..903e138e8929e1f6aec25e2518f9f5adde58eb61 100755 (executable)
--- 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 = {}
index d8bf457fa28c0ae325fb0aa60ea2f8d41e11adfd..a9585545ed80432576ff0d6bdf5be27a86286455 100755 (executable)
@@ -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 ]