Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorWerner Llácer <wllacer@gmail.com>2022-08-01 10:38:22 +0200
committerGitHub <noreply@github.com>2022-08-01 10:38:22 +0200
commit7bf0fe3c56ed1e8ca9a55ab3dbf6943f94e2a1af (patch)
treef34ae994b574485761a59b932542234e91dbaea9 /archinstall/lib
parent94d611d22f178474d1f3a491cfe60e99bd3293b3 (diff)
restoring ability to use a predefined installation directory (#1373)
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/menu/global_menu.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/archinstall/lib/menu/global_menu.py b/archinstall/lib/menu/global_menu.py
index 1badc052..d9943945 100644
--- a/archinstall/lib/menu/global_menu.py
+++ b/archinstall/lib/menu/global_menu.py
@@ -42,6 +42,7 @@ if TYPE_CHECKING:
class GlobalMenu(GeneralMenu):
def __init__(self,data_store):
+ self._disk_check = True
super().__init__(data_store=data_store, auto_cursor=True, preview_size=0.3)
def _setup_selection_menu_options(self):
@@ -304,11 +305,12 @@ class GlobalMenu(GeneralMenu):
missing += ['Hostname']
if not check('!root-password') and not has_superuser():
missing += [str(_('Either root-password or at least 1 user with sudo privileges must be specified'))]
- if not check('harddrives'):
- missing += [str(_('Drive(s)'))]
- if check('harddrives'):
- if not self._menu_options['harddrives'].is_empty() and not check('disk_layouts'):
- missing += [str(_('Disk layout'))]
+ if self._disk_check:
+ if not check('harddrives'):
+ missing += [str(_('Drive(s)'))]
+ if check('harddrives'):
+ if not self._menu_options['harddrives'].is_empty() and not check('disk_layouts'):
+ missing += [str(_('Disk layout'))]
return missing
@@ -334,7 +336,7 @@ class GlobalMenu(GeneralMenu):
def _select_harddrives(self, old_harddrives : list) -> List:
harddrives = select_harddrives(old_harddrives)
- if harddrives:
+ if harddrives is not None:
if len(harddrives) == 0:
prompt = _(
"You decided to skip harddrive selection\nand will use whatever drive-setup is mounted at {} (experimental)\n"
@@ -345,7 +347,10 @@ class GlobalMenu(GeneralMenu):
choice = Menu(prompt, Menu.yes_no(), default_option=Menu.yes(), skip=False).run()
if choice.value == Menu.no():
+ self._disk_check = True
return self._select_harddrives(old_harddrives)
+ else:
+ self._disk_check = False
# in case the harddrives got changed we have to reset the disk layout as well
if old_harddrives != harddrives: