validation: Populate dict of all variants

Until now only list of top level variants was enough, but for variant
as lookaside we need a dict including even child variants.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-04-20 09:07:18 +02:00
parent c07a4d64a1
commit 1e972885f5

View File

@ -70,6 +70,12 @@ def read_variants(compose, config):
parser = VariantsXmlParser(file_obj, tree_arches, tree_variants)
compose.variants = parser.parse()
compose.all_variants = {}
for variant in compose.variants.values():
compose.all_variants[variant.uid] = variant
for child in variant.get_variants():
compose.all_variants[child.uid] = child
def run(config, topdir, has_old):
conf = kobo.conf.PyConfigParser()