Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/interactions/general_conf.py
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2023-05-15 17:16:18 +1000
committerGitHub <noreply@github.com>2023-05-15 09:16:18 +0200
commit8a292a163ea2e643a8ac5d4cfada8a27076de630 (patch)
tree03a5f75f8da5b438c4cbccbd29544fe352a316ce /archinstall/lib/interactions/general_conf.py
parentd65359896a60dc57eb9f18c86f692c9eced7f644 (diff)
Add custom mirror support (#1816)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/interactions/general_conf.py')
-rw-r--r--archinstall/lib/interactions/general_conf.py37
1 files changed, 1 insertions, 36 deletions
diff --git a/archinstall/lib/interactions/general_conf.py b/archinstall/lib/interactions/general_conf.py
index 5fcfa633..0338c61e 100644
--- a/archinstall/lib/interactions/general_conf.py
+++ b/archinstall/lib/interactions/general_conf.py
@@ -1,11 +1,10 @@
from __future__ import annotations
import pathlib
-from typing import List, Any, Optional, Dict, TYPE_CHECKING
+from typing import List, Any, Optional, TYPE_CHECKING
from ..locale import list_keyboard_languages, list_timezones
from ..menu import MenuSelectionType, Menu, TextInput
-from ..mirrors import list_mirrors
from ..output import warn
from ..packages.packages import validate_package_list
from ..storage import storage
@@ -96,40 +95,6 @@ def select_language(preset: Optional[str] = None) -> Optional[str]:
return None
-def select_mirror_regions(preset_values: Dict[str, Any] = {}) -> Dict[str, Any]:
- """
- Asks the user to select a mirror or region
- Usually this is combined with :ref:`archinstall.list_mirrors`.
-
- :return: The dictionary information about a mirror/region.
- :rtype: dict
- """
- if preset_values is None:
- preselected = None
- else:
- preselected = list(preset_values.keys())
-
- mirrors = list_mirrors()
-
- choice = Menu(
- _('Select one of the regions to download packages from'),
- list(mirrors.keys()),
- preset_values=preselected,
- multi=True,
- allow_reset=True
- ).run()
-
- match choice.type_:
- case MenuSelectionType.Reset:
- return {}
- case MenuSelectionType.Skip:
- return preset_values
- case MenuSelectionType.Selection:
- return {selected: mirrors[selected] for selected in choice.multi_value}
-
- return {}
-
-
def select_archinstall_language(languages: List[Language], preset: Language) -> Language:
# these are the displayed language names which can either be
# the english name of a language or, if present, the