From 3bc8b401c1137084aff0041b9ab657f9f2969cd0 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 30 Nov 2024 22:08:52 +0800 Subject: [PATCH] gnome.updateScript: Fetch cache.json from download.gnome.org/sources ftp.gnome.org/pub/GNOME/sources already redirects to download.gnome.org/sources. For some reason sometimes I get "Application is not available" when using the former link but this does not happen with the latter. --- pkgs/desktops/gnome/find-latest-version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/gnome/find-latest-version.py b/pkgs/desktops/gnome/find-latest-version.py index 1cc2b55fadb3..d921fd7366cb 100644 --- a/pkgs/desktops/gnome/find-latest-version.py +++ b/pkgs/desktops/gnome/find-latest-version.py @@ -102,7 +102,7 @@ def make_version_policy( def find_versions(package_name: str, version_policy: VersionPolicy) -> List[Version]: # The structure of cache.json: https://gitlab.gnome.org/Infrastructure/sysadmin-bin/blob/master/ftpadmin#L762 - cache = json.loads(requests.get(f"https://ftp.gnome.org/pub/GNOME/sources/{package_name}/cache.json").text) + cache = json.loads(requests.get(f"https://download.gnome.org/sources/{package_name}/cache.json").text) if type(cache) != list or cache[0] != 4: raise Exception("Unknown format of cache.json file.") @@ -117,7 +117,7 @@ parser = argparse.ArgumentParser( ) parser.add_argument( "package-name", - help="Name of the directory in https://ftp.gnome.org/pub/GNOME/sources/ containing the package.", + help="Name of the directory in https://download.gnome.org/sources/ containing the package.", ) parser.add_argument( "version-policy",