From 756566348215408a752eb136f12484aa38b2d41f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Tue, 29 Jul 2025 14:57:53 +0200 Subject: [PATCH] Hand over --kiwi-file option If the --kiwi-file option is set, make sure it will be handed over to the kiwi call inside of the box. This is related to rhinstaller/anaconda#6511 --- kiwi_boxed_plugin/tasks/system_boxbuild.py | 3 +++ test/unit/tasks/system_boxbuild_test.py | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/kiwi_boxed_plugin/tasks/system_boxbuild.py b/kiwi_boxed_plugin/tasks/system_boxbuild.py index e411fc7..bfcba87 100644 --- a/kiwi_boxed_plugin/tasks/system_boxbuild.py +++ b/kiwi_boxed_plugin/tasks/system_boxbuild.py @@ -260,6 +260,9 @@ def _validate_kiwi_build_command(self) -> List[str]: for profile in sorted(set(self.global_args.get('--profile'))): final_kiwi_build_command.append('--profile') final_kiwi_build_command.append(profile) + if self.global_args.get('--kiwi-file'): + final_kiwi_build_command.append('--kiwi-file') + final_kiwi_build_command.append(self.global_args.get('--kiwi-file')) final_kiwi_build_command += kiwi_build_command log.info( 'Building with:{0} {1}'.format( diff --git a/test/unit/tasks/system_boxbuild_test.py b/test/unit/tasks/system_boxbuild_test.py index 9e35abb..c25021e 100644 --- a/test/unit/tasks/system_boxbuild_test.py +++ b/test/unit/tasks/system_boxbuild_test.py @@ -10,7 +10,10 @@ class TestSystemBoxbuildTask: def setup(self): sys.argv = [ sys.argv[0], - '--debug', '--profile', 'foo', '--type', 'oem', + '--debug', + '--profile', 'foo', + '--type', 'oem', + '--kiwi-file', 'appliance.kiwi', 'system', 'boxbuild', '--box', 'universal', '--box-memory', '4', @@ -84,7 +87,10 @@ def test_process_system_boxbuild_container(self, mock_BoxContainerBuild): ) box_containerbuild.run.assert_called_once_with( [ - '--debug', '--type', 'oem', '--profile', 'foo', + '--debug', + '--type', 'oem', + '--profile', 'foo', + '--kiwi-file', 'appliance.kiwi', 'system', 'build', '--description', 'foo', '--target-dir', 'xxx', '--allow-existing-root', @@ -107,7 +113,10 @@ def test_process_system_boxbuild(self, mock_BoxBuild): ) box_build.run.assert_called_once_with( [ - '--debug', '--type', 'oem', '--profile', 'foo', + '--debug', + '--type', 'oem', + '--profile', 'foo', + '--kiwi-file', 'appliance.kiwi', 'system', 'build', '--description', 'foo', '--target-dir', 'xxx', '--allow-existing-root',