diff --git a/pungi/phases/pkgset/sources/source_koji.py b/pungi/phases/pkgset/sources/source_koji.py index bd9cb5d5..18c6746d 100644 --- a/pungi/phases/pkgset/sources/source_koji.py +++ b/pungi/phases/pkgset/sources/source_koji.py @@ -901,7 +901,13 @@ def populate_global_pkgset(compose, koji_wrapper, event): if pkgset.reuse is None: pkgset.populate( compose_tag, - event, + # We care about packages as they existed on the specified + # event. However, modular content tags are not expected to + # change, so the event doesn't matter there. If an exact NSVC + # of a module is specified, the code above would happily find + # its content tag, but fail here if the content tag doesn't + # exist at the given event. + event=event if is_traditional else None, inherit=should_inherit, include_packages=modular_packages, ) diff --git a/tests/test_pkgset_source_koji.py b/tests/test_pkgset_source_koji.py index 3f90822b..b270bd52 100644 --- a/tests/test_pkgset_source_koji.py +++ b/tests/test_pkgset_source_koji.py @@ -116,7 +116,14 @@ class TestPopulateGlobalPkgset(helpers.PungiTestCase): self.assertEqual(len(pkgsets), 1) self.assertIs(pkgsets[0], orig_pkgset) pkgsets[0].assert_has_calls( - [mock.call.populate("f25", 123456, inherit=True, include_packages=set())], + [ + mock.call.populate( + "f25", + event=123456, + inherit=True, + include_packages=set(), + ), + ], ) def mock_materialize(self, compose, pkgset, prefix, mmd): @@ -157,12 +164,16 @@ class TestPopulateGlobalPkgset(helpers.PungiTestCase): ) pkgsets[0].assert_has_calls( - [mock.call.populate("f25", 123456, inherit=True, include_packages=set())] + [ + mock.call.populate( + "f25", event=123456, inherit=True, include_packages=set() + ), + ] ) pkgsets[1].assert_has_calls( [ mock.call.populate( - "f25-extra", 123456, inherit=True, include_packages=set() + "f25-extra", event=123456, inherit=True, include_packages=set() ), ] )