From 71608c11222ffacdb1ebf0e2c7ddeb00aecf6609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Mon, 25 Nov 2024 16:30:53 +0100 Subject: [PATCH] Fixed use of fscreateoptions for iso type The information for fscreateoptions was not passed along to the tooling if a custom filesystem attribute was specified. This Fixes #2681 --- .../x86/tumbleweed/test-image-live/appliance.kiwi | 2 +- kiwi/builder/live.py | 13 ++++++++----- test/unit/builder/live_test.py | 6 +++++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/build-tests/x86/tumbleweed/test-image-live/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-live/appliance.kiwi index e04283b2..bff6f172 100644 --- a/build-tests/x86/tumbleweed/test-image-live/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-live/appliance.kiwi @@ -33,7 +33,7 @@ - + diff --git a/kiwi/builder/live.py b/kiwi/builder/live.py index c4dc7e98..509f9016 100644 --- a/kiwi/builder/live.py +++ b/kiwi/builder/live.py @@ -301,17 +301,20 @@ class LiveImageBuilder: ) else: # Put the root filesystem into SquashFS directly - with FileSystem.new( - name=root_filesystem, - device_provider=DeviceProvider(), - root_dir=self.root_dir + os.sep, - custom_args={ + filesystem_custom_parameters.update( + { 'compression': self.xml_state.build_type.get_squashfscompression() } if root_filesystem == 'squashfs' else { 'compression': self.xml_state.build_type.get_erofscompression() } + ) + with FileSystem.new( + name=root_filesystem, + device_provider=DeviceProvider(), + root_dir=self.root_dir + os.sep, + custom_args=filesystem_custom_parameters ) as live_container_image: container_image = Temporary().new_file() live_container_image.create_on_file( diff --git a/test/unit/builder/live_test.py b/test/unit/builder/live_test.py index a08a75cc..0925838a 100644 --- a/test/unit/builder/live_test.py +++ b/test/unit/builder/live_test.py @@ -257,7 +257,11 @@ class TestLiveImageBuilder: device_provider=mock_DeviceProvider.return_value, name='squashfs', root_dir='root_dir/', - custom_args={'compression': 'lzo'} + custom_args={ + 'mount_options': ['async'], + 'create_options': ['-O', 'option'], + 'compression': 'lzo' + } ) ]