From 25b70fe5b5e9d5166f9731e69f77e348a0a0c4e3 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Apr 05 2019 23:59:34 +0000 Subject: honor mock.package_manager tag setting in mock-config cli Fixes: https://pagure.io/koji/issue/1167 --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index 8efe4de..900b8eb 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -987,6 +987,14 @@ def anon_handle_mock_config(goptions, session, args): name = options.name else: name = "%(tag_name)s-repo_%(repoid)s" % opts + + event = None + if opts['repoid'] != 'latest': + event = session.repoInfo(opts['repoid'])['create_event'] + buildcfg = session.getBuildConfig(opts['tag_name'], event=event) + if 'mock.package_manager' in buildcfg['extra']: + opts['package_manager'] = buildcfg['extra']['mock.package_manager'] + output = koji.genMockConfig(name, arch, **opts) if options.ofile: fo = open(options.ofile, 'w')