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:
parent
1bff5ccfa2
commit
410d0125bc
@ -672,6 +672,12 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event):
|
|||||||
)
|
)
|
||||||
for variant in compose.all_variants.values():
|
for variant in compose.all_variants.values():
|
||||||
if compose_tag in variant_tags[variant]:
|
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
|
# Optimization for case where we have just single compose
|
||||||
# tag - we do not have to merge in this case...
|
# tag - we do not have to merge in this case...
|
||||||
if len(variant_tags[variant]) == 1:
|
if len(variant_tags[variant]) == 1:
|
||||||
|
@ -267,6 +267,7 @@ class Variant(object):
|
|||||||
self.mmds = []
|
self.mmds = []
|
||||||
self.arch_mmds = {}
|
self.arch_mmds = {}
|
||||||
self.module_uid_to_koji_tag = {}
|
self.module_uid_to_koji_tag = {}
|
||||||
|
self.nsvc_to_pkgset = {}
|
||||||
|
|
||||||
def __getitem__(self, name):
|
def __getitem__(self, name):
|
||||||
return self.variants[name]
|
return self.variants[name]
|
||||||
|
@ -43,6 +43,7 @@ class MockVariant(mock.Mock):
|
|||||||
self.pkgset = mock.Mock(rpms_by_arch={})
|
self.pkgset = mock.Mock(rpms_by_arch={})
|
||||||
self.modules = None
|
self.modules = None
|
||||||
self.name = name
|
self.name = name
|
||||||
|
self.nsvc_to_pkgset = {}
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.uid
|
return self.uid
|
||||||
|
Loading…
Reference in New Issue
Block a user