Skip to content

Commit

Permalink
Merge pull request #2432 from OSInside/follow_up_fix_for_hybrid_drop
Browse files Browse the repository at this point in the history
Follow up fix for drop of hybrid boot snippets
  • Loading branch information
schaefi authored Jan 16, 2024
2 parents 5ee55ae + d9e9a38 commit 758080b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 3 additions & 8 deletions kiwi/bootloader/config/grub2.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,10 @@ def post_init(self, custom_args):
)

if self.xml_state.is_xen_server():
self.hybrid_boot = False
self.multiboot = True
elif self.xen_guest:
self.hybrid_boot = False
self.multiboot = False
else:
self.hybrid_boot = True
self.multiboot = False

self.grub2 = BootLoaderTemplateGrub2()
Expand Down Expand Up @@ -377,9 +374,8 @@ def setup_install_image_config(
)
else:
log.info('--> Using standard boot install template')
hybrid_boot = True
template = self.grub2.get_install_template(
self.failsafe_boot, hybrid_boot, has_graphics, has_serial,
self.failsafe_boot, has_graphics, has_serial,
self.continue_on_timeout
)
try:
Expand Down Expand Up @@ -449,10 +445,9 @@ def setup_live_image_config(
)
else:
log.info('--> Using standard boot template')
hybrid_boot = True
template = self.grub2.get_iso_template(
self.failsafe_boot, hybrid_boot,
has_graphics, has_serial, self.mediacheck_boot
self.failsafe_boot, has_graphics, has_serial,
self.mediacheck_boot
)
try:
self.config = template.substitute(parameters)
Expand Down
4 changes: 2 additions & 2 deletions test/unit/bootloader/config/grub2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ def test_setup_live_image_config_standard(
self.bootloader.multiboot = False
self.bootloader.setup_live_image_config(self.mbrid)
self.grub2.get_iso_template.assert_called_once_with(
True, True, True, True, None
True, True, True, None
)
mock_copy_grub_config_to_efi_path.assert_called_once_with(
'root_dir', 'earlyboot.cfg', 'iso'
Expand Down Expand Up @@ -1031,7 +1031,7 @@ def test_setup_install_image_config_standard(
self.bootloader.multiboot = False
self.bootloader.setup_install_image_config(self.mbrid)
self.grub2.get_install_template.assert_called_once_with(
True, True, False, False, True
True, False, False, True
)
mock_copy_grub_config_to_efi_path.assert_called_once_with(
'root_dir', 'earlyboot.cfg', 'iso'
Expand Down

0 comments on commit 758080b

Please sign in to comment.