Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/interactions
diff options
context:
space:
mode:
authorcodefiles <11915375+codefiles@users.noreply.github.com>2023-10-17 05:23:09 -0400
committerGitHub <noreply@github.com>2023-10-17 11:23:09 +0200
commitbc3b3a35e6408144587f8c2ace95c4ac68d53bcc (patch)
treeae878156a279466146893bfa0fcc7d19a9438278 /archinstall/lib/interactions
parent332ec0d6236ca863cb6a2101849555935066549f (diff)
Add support for unified kernel image (#1519)
Diffstat (limited to 'archinstall/lib/interactions')
-rw-r--r--archinstall/lib/interactions/__init__.py2
-rw-r--r--archinstall/lib/interactions/system_conf.py16
2 files changed, 17 insertions, 1 deletions
diff --git a/archinstall/lib/interactions/__init__.py b/archinstall/lib/interactions/__init__.py
index 50c0012d..4b696a78 100644
--- a/archinstall/lib/interactions/__init__.py
+++ b/archinstall/lib/interactions/__init__.py
@@ -15,5 +15,5 @@ from .general_conf import (
)
from .system_conf import (
- select_kernel, ask_for_bootloader, select_driver, ask_for_swap
+ select_kernel, ask_for_bootloader, ask_for_uki, select_driver, ask_for_swap
)
diff --git a/archinstall/lib/interactions/system_conf.py b/archinstall/lib/interactions/system_conf.py
index 0e5e0f1e..aa72748e 100644
--- a/archinstall/lib/interactions/system_conf.py
+++ b/archinstall/lib/interactions/system_conf.py
@@ -65,6 +65,22 @@ def ask_for_bootloader(preset: Bootloader) -> Bootloader:
return preset
+def ask_for_uki(preset: bool = True) -> bool:
+ if preset:
+ preset_val = Menu.yes()
+ else:
+ preset_val = Menu.no()
+
+ prompt = _('Would you like to use unified kernel images?')
+ choice = Menu(prompt, Menu.yes_no(), default_option=Menu.no(), preset_values=preset_val).run()
+
+ match choice.type_:
+ case MenuSelectionType.Skip: return preset
+ case MenuSelectionType.Selection: return False if choice.value == Menu.no() else True
+
+ return preset
+
+
def select_driver(options: List[GfxDriver] = [], current_value: Optional[GfxDriver] = None) -> Optional[GfxDriver]:
"""
Some what convoluted function, whose job is simple.