Added option to not touch mirror-list. Example if archlinux.org times out, use the existing mirror-list without trying to overwrite it.

This commit is contained in:
Anton Hvornum 2021-04-13 10:01:54 +02:00
parent 9f21ec713d
commit 67b05d8fb1
2 changed files with 5 additions and 3 deletions

View File

@ -402,4 +402,4 @@ def select_mirror_regions(mirrors, show_top_mirrors=True):
return selected_mirrors
raise RequirementError("Selecting mirror region require a least one region to be given as an option.")
return None

View File

@ -281,10 +281,12 @@ def perform_installation(mountpoint):
while 'dead' not in (status := archinstall.service_state('reflector')):
time.sleep(1)
archinstall.use_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors for the live medium
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():
installation.set_hostname(archinstall.arguments['hostname'])
installation.set_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors in the installation medium
if archinstall.arguments.get('mirror-region', None):
installation.set_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors in the installation medium
installation.set_keyboard_language(archinstall.arguments['keyboard-language'])
installation.add_bootloader()