Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/user_interaction.py
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 /archinstall/lib/user_interaction.py
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 'archinstall/lib/user_interaction.py')
-rw-r--r--archinstall/lib/user_interaction.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 66ad3e2a..f8822bac 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -966,6 +966,28 @@ def select_kernel() -> List[str]:
).run()
return selected_kernels
+def select_additional_repositories() -> List[str]:
+ """
+ Allows the user to select additional repositories (multilib, and testing) if desired.
+
+ :return: The string as a selected repository
+ :rtype: string
+ """
+
+ repositories = ["multilib", "testing"]
+
+ additional_repositories = Menu(
+ _('Choose which optional additional repositories to enable'),
+ repositories,
+ sort=False,
+ multi=True,
+ default_option=[]
+ ).run()
+
+ if additional_repositories is not None:
+ return additional_repositories
+
+ return []
def select_locale_lang(default):
locales = list_locales()