pkgset: Allow different inheritance for modules
With one compose combining traditional and modular content there might be different requirements for tag inheritance. This patch adds a new option that controls whether builds in modular tags should be inherited. It defaults to False, which is the right option for current MBS behavior. JIRA: COMPOSE-2148 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
d3938d7c04
commit
e419100d5f
@ -458,6 +458,9 @@ Options
|
||||
(*bool*) -- inherit builds from parent tags; we can turn it off only if we
|
||||
have all builds tagged in a single tag
|
||||
|
||||
**pkgset_koji_inherit_modules** = False
|
||||
(*bool*) -- the same as above, but this only applies to modular tags
|
||||
|
||||
**pkgset_repos**
|
||||
(*dict*) -- A mapping of architectures to repositories with RPMs: ``{arch:
|
||||
[repo]}``. Only use when ``pkgset_source = "repos"``.
|
||||
|
@ -748,6 +748,10 @@ def make_schema():
|
||||
"type": "boolean",
|
||||
"default": True
|
||||
},
|
||||
"pkgset_koji_inherit_modules": {
|
||||
"type": "boolean",
|
||||
"default": False
|
||||
},
|
||||
|
||||
"disc_types": {
|
||||
"type": "object",
|
||||
|
@ -484,6 +484,7 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event_id):
|
||||
compose_tags.extend(force_list(compose.conf["pkgset_koji_tag"]))
|
||||
|
||||
inherit = compose.conf["pkgset_koji_inherit"]
|
||||
inherit_modules = compose.conf["pkgset_koji_inherit_modules"]
|
||||
global_pkgset_path = os.path.join(
|
||||
compose.paths.work.topdir(arch="global"), "pkgset_global.pickle")
|
||||
if compose.DEBUG and os.path.isfile(global_pkgset_path):
|
||||
@ -517,7 +518,9 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event_id):
|
||||
# with underscores just to be safe.
|
||||
logfile = compose.paths.log.log_file(
|
||||
None, 'packages_from_%s' % compose_tag.replace('/', '_'))
|
||||
pkgset.populate(compose_tag, event_id, inherit=inherit, logfile=logfile)
|
||||
is_traditional = compose_tag in compose.conf.get('pkgset_koji_tag', [])
|
||||
should_inherit = inherit if is_traditional else inherit_modules
|
||||
pkgset.populate(compose_tag, event_id, inherit=should_inherit, logfile=logfile)
|
||||
for variant in compose.all_variants.values():
|
||||
if compose_tag in variant_tags[variant]:
|
||||
# Optimization for case where we have just single compose
|
||||
|
Loading…
Reference in New Issue
Block a user