kiwibuild: Allow setting metadata type explicitly

It is not possible to reliably detect what the type for an image should
be in the metadata. This commit adds an option for user to explicitly
provide it.

It can only be configured on the specific image, not globally.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2024-08-29 08:21:35 +02:00
parent d9d21d3cf4
commit cd2ae81e3c
4 changed files with 12 additions and 5 deletions

View file

@ -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