Include module defaults in the repodata

If the compose configuration includes the module_defaults_dir (an
scm_dict), clone the directory, read the module defaults contained
therein and include relevant defaults in the combined modulemd file.

Only defaults for modules present in the variant are included.

This requires libmodulemd 1.2.0+.

Merges: https://pagure.io/pungi/pull-request/891
Signed-off-by: Petr Šabata <contyk@redhat.com>
This commit is contained in:
Petr Šabata 2018-04-04 12:59:52 +02:00 committed by Lubomír Sedlář
parent 506ac99f62
commit 0e7f770fb7
4 changed files with 30 additions and 2 deletions

View file

@ -24,6 +24,7 @@ class TestInitPhase(PungiTestCase):
def test_run(self, write_prepopulate, write_variant, create_comps, write_arch, write_global):
compose = DummyCompose(self.topdir, {})
compose.has_comps = True
compose.has_module_defaults = False
compose.setup_optional()
phase = init.InitPhase(compose)
phase.run()
@ -51,6 +52,7 @@ class TestInitPhase(PungiTestCase):
write_arch, write_global):
compose = DummyCompose(self.topdir, {})
compose.has_comps = True
compose.has_module_defaults = False
compose.variants['Everything'].groups = []
compose.variants['Everything'].modules = []
phase = init.InitPhase(compose)
@ -78,6 +80,7 @@ class TestInitPhase(PungiTestCase):
write_arch, write_global):
compose = DummyCompose(self.topdir, {})
compose.has_comps = False
compose.has_module_defaults = False
phase = init.InitPhase(compose)
phase.run()