]> err.no Git - dak/commitdiff
Use components from database
authorMark Hymers <mhy@debian.org>
Thu, 28 Jul 2011 06:50:47 +0000 (07:50 +0100)
committerMark Hymers <mhy@debian.org>
Thu, 28 Jul 2011 06:50:47 +0000 (07:50 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/check_archive.py
dak/check_proposed_updates.py
dak/cruft_report.py
dak/override.py
dak/override_disparity.py
dak/rm.py
daklib/queue.py

index 0d94bbcb1394f14c8c26107a258ab1979c256e97..1fb8560baaa628bb61abec14f56adce4094b50ac 100755 (executable)
@@ -424,7 +424,7 @@ def check_indices_files_exist():
     Ensure files mentioned in Packages & Sources exist
     """
     for suite in [ "stable", "testing", "unstable" ]:
-        for component in Cnf.ValueList("Suite::%s::Components" % (suite)):
+        for component in get_component_names():
             architectures = get_suite_architectures(suite)
             for arch in [ i.arch_string.lower() for i in architectures ]:
                 if arch == "source":
index eb488330e951d341a302f861002b1ce0e62eb406..d45fd489c61d6815510d8e37adc6a2f08cfe8266 100755 (executable)
@@ -250,7 +250,7 @@ def parse_packages():
     # Parse the Packages files (since it's a sub-second operation on auric)
     suite = "stable"
     stable = {}
-    components = cnf.ValueList("Suite::%s::Components" % (suite))
+    components = get_component_names()
     architectures = [ a.arch_string for a in get_suite_architectures(suite, skipsrc=True, skipall=True) ]
     for component in components:
         for architecture in architectures:
index 21988dcd1d97aeb96c4a144b2df9ffb7183e2fa8..5b199dcab8de5756ec347f9ef96f349f63ae8025 100755 (executable)
@@ -571,7 +571,7 @@ def main ():
         bins_in_suite = get_suite_binaries(suite, session)
 
     # Checks based on the Sources files
-    components = cnf.ValueList("Suite::%s::Components" % (suite_name))
+    components = get_component_names(session)
     for component in components:
         filename = "%s/dists/%s/%s/source/Sources.gz" % (cnf["Dir::Root"], suite_name, component)
         # apt_pkg.ParseTagFile needs a real file handle and can't handle a GzipFile instance...
index e6d47db22b01b3c34f162356e5730fbc5ae40bf3..de888e55380115358c842cd94ae0d0392df57b6f 100755 (executable)
@@ -61,7 +61,7 @@ def check_override_compliance(package, priority, suite, cnf, session):
 
     depends = set()
     rdepends = set()
-    components = cnf.ValueList("Suite::%s::Components" % suite)
+    components = get_component_names(session)
     arches = set([x.arch_string for x in get_suite_architectures(suite)])
     arches -= set(["source", "all"])
     for arch in arches:
index b0218517048e564ac82d022b7b4de173ea405bbb..3ec6ff1f96d20832cf6a549e5fa3abb3efbb39f5 100755 (executable)
@@ -82,7 +82,7 @@ def main():
     depends = {}
     session = DBConn().session()
     suite = Options['suite']
-    components = cnf.ValueList('Suite::%s::Components' % suite)
+    components = get_component_names(session)
     arches = set([x.arch_string for x in get_suite_architectures(suite)])
     arches -= set(['source', 'all'])
     for arch in arches:
index 944a46e6a0b1e5811387058e3b90743bed82a1c5..e0a5fa79d73653d538067f0947330222cae109e3 100755 (executable)
--- a/dak/rm.py
+++ b/dak/rm.py
@@ -102,7 +102,7 @@ def reverse_depends_check(removals, suites, arches=None):
     cnf = Config()
 
     print "Checking reverse dependencies..."
-    components = cnf.ValueList("Suite::%s::Components" % suites[0])
+    components = get_component_names()
     dep_problem = 0
     p2c = {}
     all_broken = {}
index c7785adeb0ac81ec1bf133c5e322e3e1d2ada758..416547198b759ac326ffd024242b56fedb0d9f3d 100755 (executable)
@@ -961,8 +961,7 @@ class Upload(object):
                 entry["component"] = dest
 
         # Ensure the component is valid for the target suite
-        if cnf.has_key("Suite:%s::Components" % (suite)) and \
-           entry["component"] not in cnf.ValueList("Suite::%s::Components" % (suite)):
+        if entry["component"] not in get_component_names(session):
             self.rejects.append("unknown component `%s' for suite `%s'." % (entry["component"], suite))
             return