Skip to content

Commit 786faf4

Browse files
committed
Fix profile env variable name regression
In the effort of adapting to the latest snapper in Issue #2697 we overlooked the after effect of a different variable name in the profile environment with regards to $kiwi_btrfs_root_is_snapshot and $kiwi_btrfs_root_is_snapper_snapshot. Image builds that references the former variable name would be broken by the change. This commit makes sure no regression is introduced by providing both variants. This Fixes bsc#1237772
1 parent aaa9380 commit 786faf4

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

kiwi/system/profile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ def _type_to_profile(self):
322322
self.xml_state.get_build_type_bootloader_console()[0] or 'default',
323323
self.xml_state.get_build_type_bootloader_console()[1] or 'default'
324324
)
325+
self.dot_profile['kiwi_btrfs_root_is_snapshot'] = \
326+
type_section.get_btrfs_root_is_snapper_snapshot()
325327
self.dot_profile['kiwi_btrfs_root_is_snapper_snapshot'] = \
326328
type_section.get_btrfs_root_is_snapper_snapshot()
327329
self.dot_profile['kiwi_gpt_hybrid_mbr'] = \

test/unit/system/profile_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def test_create_live(self, mock_which):
4949
'kiwi_firmware': 'bios',
5050
'kiwi_bootloader': 'grub2',
5151
'kiwi_bootloader_console': 'default:default',
52+
'kiwi_btrfs_root_is_snapshot': None,
5253
'kiwi_btrfs_root_is_snapper_snapshot': None,
5354
'kiwi_gpt_hybrid_mbr': None,
5455
'kiwi_devicepersistency': None,
@@ -137,6 +138,7 @@ def test_create_oem(self, mock_which):
137138
'kiwi_ramonly': True,
138139
'kiwi_initrd_system': 'dracut',
139140
'kiwi_install_volid': 'INSTALL',
141+
'kiwi_btrfs_root_is_snapshot': None,
140142
'kiwi_btrfs_root_is_snapper_snapshot': None,
141143
'kiwi_gpt_hybrid_mbr': None,
142144
'kiwi_showlicense': None,

test/unit/tasks/image_info_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ def test_process_image_info_print_kiwi_env(self, mock_out):
151151
('kiwi_bootloader_console', 'default:default'),
152152
('kiwi_bootprofile', ''),
153153
('kiwi_btrfs_root_is_snapper_snapshot', ''),
154+
('kiwi_btrfs_root_is_snapshot', ''),
154155
('kiwi_cmdline', ''),
155156
('kiwi_compressed', ''),
156157
('kiwi_delete', ''),

0 commit comments

Comments
 (0)