restoring ability to use a predefined installation directory (#1373)
This commit is contained in:
parent
94d611d22f
commit
7bf0fe3c56
|
|
@ -42,6 +42,7 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
class GlobalMenu(GeneralMenu):
|
class GlobalMenu(GeneralMenu):
|
||||||
def __init__(self,data_store):
|
def __init__(self,data_store):
|
||||||
|
self._disk_check = True
|
||||||
super().__init__(data_store=data_store, auto_cursor=True, preview_size=0.3)
|
super().__init__(data_store=data_store, auto_cursor=True, preview_size=0.3)
|
||||||
|
|
||||||
def _setup_selection_menu_options(self):
|
def _setup_selection_menu_options(self):
|
||||||
|
|
@ -304,11 +305,12 @@ class GlobalMenu(GeneralMenu):
|
||||||
missing += ['Hostname']
|
missing += ['Hostname']
|
||||||
if not check('!root-password') and not has_superuser():
|
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'))]
|
missing += [str(_('Either root-password or at least 1 user with sudo privileges must be specified'))]
|
||||||
if not check('harddrives'):
|
if self._disk_check:
|
||||||
missing += [str(_('Drive(s)'))]
|
if not check('harddrives'):
|
||||||
if check('harddrives'):
|
missing += [str(_('Drive(s)'))]
|
||||||
if not self._menu_options['harddrives'].is_empty() and not check('disk_layouts'):
|
if check('harddrives'):
|
||||||
missing += [str(_('Disk layout'))]
|
if not self._menu_options['harddrives'].is_empty() and not check('disk_layouts'):
|
||||||
|
missing += [str(_('Disk layout'))]
|
||||||
|
|
||||||
return missing
|
return missing
|
||||||
|
|
||||||
|
|
@ -334,7 +336,7 @@ class GlobalMenu(GeneralMenu):
|
||||||
def _select_harddrives(self, old_harddrives : list) -> List:
|
def _select_harddrives(self, old_harddrives : list) -> List:
|
||||||
harddrives = select_harddrives(old_harddrives)
|
harddrives = select_harddrives(old_harddrives)
|
||||||
|
|
||||||
if harddrives:
|
if harddrives is not None:
|
||||||
if len(harddrives) == 0:
|
if len(harddrives) == 0:
|
||||||
prompt = _(
|
prompt = _(
|
||||||
"You decided to skip harddrive selection\nand will use whatever drive-setup is mounted at {} (experimental)\n"
|
"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()
|
choice = Menu(prompt, Menu.yes_no(), default_option=Menu.yes(), skip=False).run()
|
||||||
|
|
||||||
if choice.value == Menu.no():
|
if choice.value == Menu.no():
|
||||||
|
self._disk_check = True
|
||||||
return self._select_harddrives(old_harddrives)
|
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
|
# in case the harddrives got changed we have to reset the disk layout as well
|
||||||
if old_harddrives != harddrives:
|
if old_harddrives != harddrives:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue