Install module-build-macros to the buildroot

This commit is contained in:
Jakub Kadlčík
2017-04-05 21:14:26 +02:00
parent ca805e698e
commit 3b7108dc07

View File

@@ -159,6 +159,17 @@ class CoprModuleBuilder(GenericBuilder):
koji add-group-pkg $module-build-tag srpm-build bash
"""
# Install the module-build-macros into the buildroot
# We are using same hack as mock builder does
for artifact in artifacts:
if artifact and artifact.startswith("module-build-macros"):
chroot = self.client.get_chroot(self.copr.projectname, self.copr.username, "fedora-24-x86_64")
packages = (chroot.data["chroot"]["buildroot_pkgs"] or "").split()
self.client.edit_chroot(self.copr.projectname, "fedora-24-x86_64",
ownername=self.copr.username,
packages=" ".join(set(["module-build-macros"] + packages)))
break
# Start of a new batch of builds is triggered by buildsys.repo.done message.
# However in Copr there is no such thing. Therefore we are going to fake
# the message when builds are finished