Fix recover_orphaned_artifact for module-build-macros

When recover_orphaned_artifact is called for module-build-macros
and the module-build-macros is not tagged in the -build Koji tag,
then the tag_artifacts() is called to tag it there.

This is correct, but the issue is that module-build-macros need
to be added to "build" and "srpm-build" Koji tag groups, otherwise
it is not installed in the buildroot by default.
This commit is contained in:
Qixiang Wan
2019-07-23 15:57:24 +08:00
parent efb0ab307e
commit ab8abef058
2 changed files with 62 additions and 0 deletions

View File

@@ -778,6 +778,11 @@ class KojiModuleBuilder(GenericBuilder):
component_tagged_in = []
if build_tagged:
component_tagged_in.append(self.module_build_tag["name"])
elif component_build.package == "module-build-macros":
# module-build-macros need to be added to
# "build" and "srpm-build" koji tag groups
self.buildroot_add_artifacts(
[component_build.nvr], install=component_build.build_time_only)
else:
# Tag it in the build tag if it's not there
self.tag_artifacts([component_build.nvr], dest_tag=False)