Add conflicts in module-build-macros for NEVRAs found in handle_collisions_with_base_module_rpms

PR #1331 made the assumption that the Ursa Major ursine RPMs were at
xmd["mbs"]["ursine_rpms"], but they are actually at
xmd["mbs"]["buildrequires"]["platform"]["ursine_rpms"]. This commit
handles the ursine RPMs generated by handle_collisions_with_base_module_rpms
separately since the base module the RPMs came from are not tracked in
that function.
This commit is contained in:
mprahl
2019-09-18 16:14:40 -04:00
parent e2939c80a1
commit 749f186524
5 changed files with 26 additions and 19 deletions

View File

@@ -359,6 +359,18 @@ class KojiModuleBuilder(GenericBuilder):
)
)
# These are generated from handle_collisions_with_base_module_rpms and are different than
# the stream collision modules
ursine_rpms = mmd.get_xmd()["mbs"].get("ursine_rpms")
if ursine_rpms:
log.debug("Adding %d ursine RPM(s) to the conflicts", len(ursine_rpms))
filter_conflicts.append(
"\n# Filter out base module RPMs that overlap with the RPMs in the buildrequired "
"modules"
)
for ursine_rpm in ursine_rpms:
filter_conflicts.append(KojiModuleBuilder.format_conflicts_line(ursine_rpm))
spec_content = textwrap.dedent("""
%global dist {disttag}
%global modularitylabel {module_name}:{module_stream}:{module_version}:{module_context}