提交 d7b43e59 编写于 作者: M Mark Hymers

Use components from database

Signed-off-by: NMark Hymers <mhy@debian.org>
上级 b183dd46
......@@ -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":
......
......@@ -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:
......
......@@ -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...
......
......@@ -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:
......
......@@ -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:
......
......@@ -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 = {}
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册