Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/guided.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2021-04-14 12:06:15 +0200
committerGitHub <noreply@github.com>2021-04-14 12:06:15 +0200
commit99fb1304ea4bcf2744b06abdd4b747b686aaeef4 (patch)
treee160db96358a5037a6491d90b9497e14f5b822f1 /examples/guided.py
parentc07d286f57792bf252f75e14603695111ab88f92 (diff)
Updated the loop logic for packages
It wouldn't loop over the question again, so correct for that.
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 7ba787f4..fc7ddeb6 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -183,22 +183,24 @@ def ask_user_questions():
archinstall.arguments['audio'] = None
# Additional packages (with some light weight error handling for invalid package names)
- if not archinstall.arguments.get('packages', None):
- print("Packages not part of the desktop environment are not installed by default.")
- print("If you desire a web browser, such as firefox or chromium, you may specify it in the following prompt.")
- archinstall.arguments['packages'] = [package for package in input('Write additional packages to install (space separated, leave blank to skip): ').split(' ') if len(package)]
-
- if len(archinstall.arguments['packages']):
- invalid_packages = True
- while invalid_packages == True:
+ while True:
+ if not archinstall.arguments.get('packages', None):
+ print("Only packages such as base, base-devel, linux, linux-firmware, efibootmgr and optional profile packages are installed.")
+ print("If you desire a web browser, such as firefox or chromium, you may specify it in the following prompt.")
+ archinstall.arguments['packages'] = [package for package in input('Write additional packages to install (space separated, leave blank to skip): ').split(' ') if len(package)]
+
+ if len(archinstall.arguments['packages']):
# Verify packages that were given
try:
archinstall.log(f"Verifying that additional packages exist (this might take a few seconds)")
archinstall.validate_package_list(archinstall.arguments['packages'])
- invalid_packages = False
+ break
except archinstall.RequirementError as e:
archinstall.log(e, fg='red')
- invalid_packages = True
+ archinstall.arguments['packages'] = None # Clear the packages to trigger a new input question
+ else:
+ # no additional packages were selected, which we'll allow
+ break
# Ask or Call the helper function that asks the user to optionally configure a network.
if not archinstall.arguments.get('nic', None):