]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
arch: remove mirror selection code 1116/head
authorMorten Linderud <morten.linderud@mullvad.net>
Mon, 15 Aug 2022 09:39:50 +0000 (11:39 +0200)
committerMorten Linderud <morten.linderud@mullvad.net>
Mon, 15 Aug 2022 09:58:17 +0000 (11:58 +0200)
Signed-off-by: Morten Linderud <morten.linderud@mullvad.net>
mkosi/__init__.py

index 287fac58fa1dc9e2e366a8022cbb1da5f7d40021..b32eaedeb068978032b3d11bab2d31aa83b16316 100644 (file)
@@ -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)