set module_hotfixes=1 in yum.conf via tag config

New field in tag extra 'mock.yum.module_hotfixes' can be used to set
module_hotfixes=0/1 in yum.conf's inside mock's buildroots.

Fixes: https://pagure.io/koji/issue/1521
This commit is contained in:
Tomas Kopecek 2019-07-06 09:43:45 +02:00 committed by Mike McLean
parent 916d03e954
commit a5014ac29b
2 changed files with 4 additions and 0 deletions

View file

@ -272,6 +272,8 @@ class BuildRoot(object):
opts['target_arch'] = self.target_arch
if 'mock.package_manager' in self.config['extra']:
opts['package_manager'] = self.config['extra']['mock.package_manager']
if 'mock.yum.module_hotfixes' in self.config['extra']:
opts['module_hotfixes'] = self.config['extra']['mock.yum.module_hotfixes']
if self.internal_dev_setup is not None:
opts['internal_dev_setup'] = bool(self.internal_dev_setup)
output = koji.genMockConfig(self.name, self.br_arch, managed=True, **opts)

View file

@ -1537,6 +1537,8 @@ name=build
yc_parts.append("baseurl=%s\n" % urls[0])
for url in urls[1:]:
yc_parts.append(" %s\n" % url)
if opts.get('module_hotfixes'):
yc_parts.append("module_hotfixes=1\n")
config_opts['yum.conf'] = ''.join(yc_parts)
plugin_conf = {