From fcdafd22e1ca2a51f3f9583f68fd02f2786f13e2 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 19 Nov 2019 00:26:00 +0000 Subject: debug --- archinstall.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'archinstall.py') diff --git a/archinstall.py b/archinstall.py index ec371dee..26603be8 100644 --- a/archinstall.py +++ b/archinstall.py @@ -885,6 +885,9 @@ def mount_mountpoints(drive, bootpartition, mountpoint='/mnt/boot', *positionals mount_boot(drive, bootpartition, mountpoint='/mnt/boot', *positionals, **kwargs) return True +def re_rank_mirrors(top=10, *positionals, **kwargs) + o = simple_command('/usr/bin/rankmirrors -n {top} /root/mirrorlist > /etc/pacman.d/mirrorlist') + def filter_mirrors_by_country(countries, top=10, *positionals, **kwargs): ## TODO: replace wget with urllib.request (no point in calling syscommand) country_list = [] @@ -892,7 +895,7 @@ def filter_mirrors_by_country(countries, top=10, *positionals, **kwargs): country_list.append(f'country={country}') o = simple_command(f"/usr/bin/wget 'https://www.archlinux.org/mirrorlist/?{'&'.join(country_list)}&protocol=https&ip_version=4&ip_version=6&use_mirror_status=on' -O /root/mirrorlist") o = simple_command("/usr/bin/sed -i 's/#Server/Server/' /root/mirrorlist") - o = simple_command('/usr/bin/rankmirrors -n {top} /root/mirrorlist > /etc/pacman.d/mirrorlist') + re_rank_mirrors(top, *positionals, **kwargs) return True def strap_in_base(*positionals, **kwargs): -- cgit v1.2.3-70-g09d2