Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDylan M. Taylor <dylan@dylanmtaylor.com>2022-02-13 10:30:49 -0500
committerGitHub <noreply@github.com>2022-02-13 16:30:49 +0100
commitd9118a33b3a25839fde8626cde313115ddb79376 (patch)
treec8ba007ac0e60f9c9cb2713fb087d9c957a65d13 /examples
parent67b922002a30744ba35b36119bed650063e26d35 (diff)
Switch from flags to an 'additional repository' menu (#977)
* Add multilib flag to enable this repository and enable multi-lib testing if testing flag is also passed * Fix comments * Attempt to force pacman to use the config file from the host * Make sure the pacman configuration is copied to target * flake8 * Call enable on additional-repositories * Add method to select additional repositories * Add menu option for additional repos * This is a bit cleaner than having it all on one line * Add import * Use [] as default instead of None * Use empty array for default option here * Try this to ensure a valid array is returned on skipping * Add additional-repositories to schema * Missed changing this comment earlier
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/guided.py b/examples/guided.py
index ddeed36f..24db7eb4 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -87,6 +87,8 @@ def ask_user_questions():
global_menu.enable('ntp')
+ global_menu.enable('additional-repositories')
+
global_menu.run()
@@ -143,8 +145,12 @@ def perform_installation(mountpoint):
# Set mirrors used by pacstrap (outside of installation)
if archinstall.arguments.get('mirror-region', None):
archinstall.use_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors for the live medium
-
- if installation.minimal_installation(testing=archinstall.arguments.get('testing', False), multilib=archinstall.arguments.get('multilib', False)):
+
+ # Retrieve list of additional repositories and set boolean values appropriately
+ enable_testing = 'testing' in archinstall.arguments.get('additional-repositories', None)
+ enable_multilib = 'multilib' in archinstall.arguments.get('additional-repositories', None)
+
+ if installation.minimal_installation(testing=enable_testing, multilib=enable_multilib):
installation.set_locale(archinstall.arguments['sys-language'], archinstall.arguments['sys-encoding'].upper())
installation.set_hostname(archinstall.arguments['hostname'])
if archinstall.arguments['mirror-region'].get("mirrors", None) is not None: