From: Morten Linderud Date: Mon, 15 Aug 2022 09:39:50 +0000 (+0200) Subject: arch: remove mirror selection code X-Git-Tag: v14~85^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1116%2Fhead;p=thirdparty%2Fmkosi.git arch: remove mirror selection code Signed-off-by: Morten Linderud --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 287fac58f..b32eaedeb 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -2710,19 +2710,8 @@ def install_arch(args: MkosiArgs, root: Path, do_run_build_script: bool) -> None else: server = f"Server = {args.mirror}/$repo/os/$arch" else: - # Instead of harcoding a single mirror, we retrieve a list of mirrors from Arch's mirrorlist - # generator ordered by mirror score. This usually results in a solid mirror and also ensures that we - # have fallback mirrors available if necessary. Finally, the mirrors will be more likely to be up to - # date and we won't end up with a stable release that hardcodes a broken mirror. - mirrorlist = workspace(root) / "mirrorlist" - with urllib.request.urlopen( - "https://www.archlinux.org/mirrorlist/?country=all&protocol=https&ip_version=4&use_mirror_status=on" - ) as r: - mirrors = r.readlines() - uncommented = [line.decode("utf-8")[1:] for line in mirrors] - with mirrorlist.open("w") as f: - f.writelines(uncommented) - server = f"Include = {mirrorlist}" + # This should not happen, but for good measure. + die("No repository mirror has been selected.") # Create base layout for pacman and pacman-key os.makedirs(root / "var/lib/pacman", 0o755, exist_ok=True)