From cf8d67db902203d18e86378632e22454deb960b4 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Dec 16 2019 15:59:36 +0000 Subject: Propagate module_hotfixes to getMockConfig The Koji cli does this, and any wrapper tool should too to generate the same output. Resolves: rhbz#1780228 Signed-off-by: Lubomír Sedlář --- diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py index 7fbc6c2..2dddad7 100644 --- a/pyrpkg/__init__.py +++ b/pyrpkg/__init__.py @@ -2646,6 +2646,7 @@ class Commands(object): build_target["build_tag_name"] ) package_manager = build_config.get("extra", {}).get("mock.package_manager") + module_hotfixes = build_config.get("extra", {}).get("mock.yum.module_hotfixes") # Generate the config config = koji.genMockConfig( @@ -2656,6 +2657,7 @@ class Commands(object): repoid=repoid, topurl=self.topurl, package_manager=package_manager, + module_hotfixes=module_hotfixes, ) # Return the mess diff --git a/tests/test_cli.py b/tests/test_cli.py index bc9745f..d80243d 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1724,7 +1724,7 @@ class TestMockConfig(CliTestCase): self.kojisession.getBuildTarget.return_value = self.fake_build_target self.kojisession.getRepo.return_value = self.fake_repo self.kojisession.getBuildConfig.return_value = { - "extra": {"mock.package_manager": "dnf"} + "extra": {"mock.package_manager": "dnf", "mock.yum.module_hotfixes": 1} } def tearDown(self): @@ -1751,6 +1751,7 @@ class TestMockConfig(CliTestCase): repoid=self.fake_repo['id'], topurl='http://localhost/hub', package_manager="dnf", + module_hotfixes=1, ) mock_config = stdout.getvalue().strip()