diff --git a/doc/configuration.rst b/doc/configuration.rst index c6f936ab..ded479ed 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1574,6 +1574,9 @@ KiwiBuild Settings described in :ref:`automatic versioning `. * ``repo_releasever`` -- (*str*) Override default releasever of the output image. + * ``manifest_type`` -- the image type that is put into the manifest by + pungi. If not supplied, an autodetected value will be provided. It may or + may not make sense. The options can be set either for the specific image, or at the phase level (see below). Version also falls back to ``global_version``. diff --git a/pungi/checks.py b/pungi/checks.py index 2aaf01f3..c3e05075 100644 --- a/pungi/checks.py +++ b/pungi/checks.py @@ -1227,6 +1227,7 @@ def make_schema(): "bundle_name_format": {"type": "string"}, "version": {"type": "string"}, "repo_releasever": {"type": "string"}, + "manifest_type": {"type": "string"}, }, "required": [ # description_scm and description_path diff --git a/pungi/phases/kiwibuild.py b/pungi/phases/kiwibuild.py index 12ec26dd..bb268125 100644 --- a/pungi/phases/kiwibuild.py +++ b/pungi/phases/kiwibuild.py @@ -211,9 +211,9 @@ class RunKiwiBuildThread(WorkerThread): # Update image manifest img = Image(compose.im) - # Get the manifest type from the config if supplied, otherwise we - # determine the manifest type based on the koji output - img.type = type_ + # If user configured exact type, use it, otherwise try to + # figure it out based on the koji output. + img.type = config.get("manifest_type", type_) img.format = format_ img.path = os.path.join(rel_image_dir, filename) img.mtime = util.get_mtime(image_dest) diff --git a/tests/test_kiwibuildphase.py b/tests/test_kiwibuildphase.py index 491dbf33..e3ccdb72 100644 --- a/tests/test_kiwibuildphase.py +++ b/tests/test_kiwibuildphase.py @@ -73,6 +73,7 @@ class TestKiwiBuildPhase(PungiTestCase): "bundle_name_format": "fmt", "version": "Rawhide", "repo_releasever": "41", + "manifest_type": "live-kiwi", }, MINIMAL_CONF, ) @@ -366,7 +367,9 @@ class TestKiwiBuildThread(PungiTestCase): "kiwibuild_bundle_format": "%N-%P-40_Beta-%I.%A.%T", }, ) - config = _merge({"subvariant": "Test"}, MINIMAL_CONF) + config = _merge( + {"subvariant": "Test", "manifest_type": "live-kiwi"}, MINIMAL_CONF + ) pool = mock.Mock() get_image_paths = KojiWrapper.return_value.get_image_paths @@ -459,7 +462,7 @@ class TestKiwiBuildThread(PungiTestCase): assert kwargs["arch"] == image.arch assert image.path == expected_path assert "iso" == image.format - assert "iso" == image.type + assert "live-kiwi" == image.type assert image.bootable assert "Test" == image.subvariant