From 5db4456dba9f8c85ff70e545fa5bb3d6a37bd265 Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Fri, 1 Dec 2023 09:59:44 -0500 Subject: Restrict UKI to supported options (#2280) --- archinstall/lib/global_menu.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'archinstall/lib/global_menu.py') diff --git a/archinstall/lib/global_menu.py b/archinstall/lib/global_menu.py index d3d87603..e65915db 100644 --- a/archinstall/lib/global_menu.py +++ b/archinstall/lib/global_menu.py @@ -218,14 +218,20 @@ class GlobalMenu(AbstractMenu): return False return self._validate_bootloader() is None + def _update_uki_display(self, name: Optional[str] = None): + if bootloader := self._menu_options['bootloader'].current_selection: + if not SysInfo.has_uefi() or not bootloader.has_uki_support(): + self._menu_options['uki'].set_current_selection(False) + self._menu_options['uki'].set_enabled(False) + elif name and name == 'bootloader': + self._menu_options['uki'].set_enabled(True) + def _update_install_text(self, name: Optional[str] = None, value: Any = None): text = self._install_text() self._menu_options['install'].update_description(text) def post_callback(self, name: Optional[str] = None, value: Any = None): - if not SysInfo.has_uefi(): - self._menu_options['uki'].set_enabled(False) - + self._update_uki_display(name) self._update_install_text(name, value) def _install_text(self): @@ -366,8 +372,6 @@ class GlobalMenu(AbstractMenu): if bootloader == Bootloader.Limine: if boot_partition.fs_type != disk.FilesystemType.Fat32: return "Limine does not support booting from filesystems other than FAT32" - elif self._menu_options['uki'].current_selection: - return "Limine does not support booting UKIs" return None -- cgit v1.2.3-54-g00ecf