pkgset: Save package set for each module

This can be used in figuring out which packages go into the module and
which not.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-10-01 15:20:49 +02:00
parent 1bff5ccfa2
commit 410d0125bc
3 changed files with 8 additions and 0 deletions

View File

@ -672,6 +672,12 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event):
)
for variant in compose.all_variants.values():
if compose_tag in variant_tags[variant]:
# If it's a modular tag, store the package set for the module.
for nsvc, koji_tag in variant.module_uid_to_koji_tag.items():
if compose_tag == koji_tag:
variant.nsvc_to_pkgset[nsvc] = pkgset
# Optimization for case where we have just single compose
# tag - we do not have to merge in this case...
if len(variant_tags[variant]) == 1:

View File

@ -267,6 +267,7 @@ class Variant(object):
self.mmds = []
self.arch_mmds = {}
self.module_uid_to_koji_tag = {}
self.nsvc_to_pkgset = {}
def __getitem__(self, name):
return self.variants[name]

View File

@ -43,6 +43,7 @@ class MockVariant(mock.Mock):
self.pkgset = mock.Mock(rpms_by_arch={})
self.modules = None
self.name = name
self.nsvc_to_pkgset = {}
def __str__(self):
return self.uid