kiwi: Add support for overriding image type attributes

This allows setting things like the volume and application IDs
for ISO builds.
This commit is contained in:
Neal Gompa 2024-08-11 14:42:31 -04:00 committed by Tomas Kopecek
parent fdb00d34dd
commit b22449c553
3 changed files with 12 additions and 1 deletions

View file

@ -389,6 +389,8 @@ class KiwiCreateImageTask(BaseBuildTask):
'--description', os.path.join(os.path.basename(scmsrcdir), base_path),
'--target-dir', target_dir,
])
for typeattr in self.opts.get('type_attr', [])::
cmd.extend(['--set-type-attr', typeattr])
rv = broot.mock(['--cwd', broot.tmpdir(within=True), '--chroot', '--'] + cmd)
if rv:
raise koji.GenericError("Kiwi failed")