Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/scripts
diff options
context:
space:
mode:
authorDaniel Girtler <girtler.daniel@gmail.com>2024-03-08 00:43:16 +1100
committerGitHub <noreply@github.com>2024-03-07 14:43:16 +0100
commitf927fb6e6a17123c05c6595bbdb45ed771596ab9 (patch)
tree9f858daed9ff66e1790b87bb3449a12ffa57d560 /archinstall/scripts
parent21dd295259e26580faa259dfe32d8e9554ae8933 (diff)
Fix 2307 - Custom mirrors (#2350)
* Fix 2307 - Custom mirrors * Update
Diffstat (limited to 'archinstall/scripts')
-rw-r--r--archinstall/scripts/guided.py9
-rw-r--r--archinstall/scripts/swiss.py9
2 files changed, 4 insertions, 14 deletions
diff --git a/archinstall/scripts/guided.py b/archinstall/scripts/guided.py
index 44b0ae17..f56ce5b4 100644
--- a/archinstall/scripts/guided.py
+++ b/archinstall/scripts/guided.py
@@ -10,7 +10,6 @@ from archinstall.lib.global_menu import GlobalMenu
from archinstall.lib.configuration import ConfigurationOutput
from archinstall.lib.installer import Installer
from archinstall.lib.menu import Menu
-from archinstall.lib.mirrors import use_mirrors, add_custom_mirrors
from archinstall.lib.models import AudioConfiguration
from archinstall.lib.models.bootloader import Bootloader
from archinstall.lib.models.network_configuration import NetworkConfiguration
@@ -132,12 +131,8 @@ def perform_installation(mountpoint: Path):
# generate encryption key files for the mounted luks devices
installation.generate_key_files()
- # Set mirrors used by pacstrap (outside of installation)
if mirror_config := archinstall.arguments.get('mirror_config', None):
- if mirror_config.mirror_regions:
- use_mirrors(mirror_config.mirror_regions)
- if mirror_config.custom_mirrors:
- add_custom_mirrors(mirror_config.custom_mirrors)
+ installation.set_mirrors(mirror_config, on_target=False)
installation.minimal_installation(
testing=enable_testing,
@@ -148,7 +143,7 @@ def perform_installation(mountpoint: Path):
)
if mirror_config := archinstall.arguments.get('mirror_config', None):
- installation.set_mirrors(mirror_config) # Set the mirrors in the installation medium
+ installation.set_mirrors(mirror_config, on_target=True)
if archinstall.arguments.get('swap'):
installation.setup_swap('zram')
diff --git a/archinstall/scripts/swiss.py b/archinstall/scripts/swiss.py
index 1db304a8..8a5488bc 100644
--- a/archinstall/scripts/swiss.py
+++ b/archinstall/scripts/swiss.py
@@ -4,7 +4,6 @@ from typing import TYPE_CHECKING, Any, Dict, Optional
import archinstall
from archinstall import SysInfo, info, debug
-from archinstall.lib import mirrors
from archinstall.lib import models
from archinstall.lib import disk
from archinstall.lib import locale
@@ -188,12 +187,8 @@ def perform_installation(mountpoint: Path, exec_mode: ExecutionMode):
# generate encryption key files for the mounted luks devices
installation.generate_key_files()
- # Set mirrors used by pacstrap (outside of installation)
if mirror_config := archinstall.arguments.get('mirror_config', None):
- if mirror_config.mirror_regions:
- mirrors.use_mirrors(mirror_config.mirror_regions)
- if mirror_config.custom_mirrors:
- mirrors.add_custom_mirrors(mirror_config.custom_mirrors)
+ installation.set_mirrors(mirror_config)
installation.minimal_installation(
testing=enable_testing,
@@ -203,7 +198,7 @@ def perform_installation(mountpoint: Path, exec_mode: ExecutionMode):
)
if mirror_config := archinstall.arguments.get('mirror_config', None):
- installation.set_mirrors(mirror_config) # Set the mirrors in the installation medium
+ installation.set_mirrors(mirror_config, on_target=True)
if archinstall.arguments.get('swap'):
installation.setup_swap('zram')