Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/only_hd.py18
-rw-r--r--examples/swiss.py6
2 files changed, 18 insertions, 6 deletions
diff --git a/examples/only_hd.py b/examples/only_hd.py
index 76a616db..b3379601 100644
--- a/examples/only_hd.py
+++ b/examples/only_hd.py
@@ -14,7 +14,7 @@ class OnlyHDMenu(archinstall.GlobalMenu):
mandatory_list = []
options_list = ['harddrives', 'disk_layouts', '!encryption-password','swap']
mandatory_list = ['harddrives']
- options_list.extend(['install','abort'])
+ options_list.extend(['save_config','install','abort'])
for entry in self._menu_options:
if entry in options_list:
@@ -27,15 +27,27 @@ class OnlyHDMenu(archinstall.GlobalMenu):
self.option(entry).set_enabled(False)
self._update_install_text()
+ def mandatory_lacking(self) -> [int, list]:
+ mandatory_fields = []
+ mandatory_waiting = 0
+ for field in self._menu_options:
+ option = self._menu_options[field]
+ if option.is_mandatory():
+ if not option.has_selection():
+ mandatory_waiting += 1
+ mandatory_fields += [field,]
+ return mandatory_fields, mandatory_waiting
+
def _missing_configs(self):
""" overloaded method """
def check(s):
return self.option(s).has_selection()
- _, missing = self.mandatory_overview()
+ missing, missing_cnt = self.mandatory_lacking()
if check('harddrives'):
if not self.option('harddrives').is_empty() and not check('disk_layouts'):
- missing += 1
+ missing_cnt += 1
+ missing += ['disk_layout']
return missing
def ask_user_questions():
diff --git a/examples/swiss.py b/examples/swiss.py
index 6f524103..b94ddcce 100644
--- a/examples/swiss.py
+++ b/examples/swiss.py
@@ -215,7 +215,7 @@ class MyMenu(archinstall.GlobalMenu):
if self._execution_mode in ('full','lineal'):
options_list = ['keyboard-layout', 'mirror-region', 'harddrives', 'disk_layouts',
'!encryption-password','swap', 'bootloader', 'hostname', '!root-password',
- '!superusers', '!users', 'profile', 'audio', 'kernels', 'packages','nic',
+ '!superusers', '!users', 'profile', 'audio', 'kernels', 'packages','additional-repositories','nic',
'timezone', 'ntp']
if archinstall.arguments.get('advanced',False):
options_list.extend(['sys-language','sys-encoding'])
@@ -226,7 +226,7 @@ class MyMenu(archinstall.GlobalMenu):
elif self._execution_mode == 'only_os':
options_list = ['keyboard-layout', 'mirror-region','bootloader', 'hostname',
'!root-password', '!superusers', '!users', 'profile', 'audio', 'kernels',
- 'packages', 'nic', 'timezone', 'ntp']
+ 'packages', 'additional-repositories', 'nic', 'timezone', 'ntp']
mandatory_list = ['hostname']
if archinstall.arguments.get('advanced',False):
options_list.expand(['sys-language','sys-encoding'])
@@ -236,7 +236,7 @@ class MyMenu(archinstall.GlobalMenu):
archinstall.log(f"self._execution_mode {self._execution_mode} not supported")
exit(1)
if self._execution_mode != 'lineal':
- options_list.extend(['install','abort'])
+ options_list.extend(['save_config','install','abort'])
if not archinstall.arguments.get('advanced'):
options_list.append('archinstall-language')