From ecbf22a6ac397a791204590f94c0afa82e29e79f Mon Sep 17 00:00:00 2001
From: Ben Gamari <ben@smart-cactus.org>
Date: Sat, 27 Apr 2024 13:12:45 -0400
Subject: [PATCH] ghcup-metadata: Drop output_name field

This is entirely redundant to the filename of the URL. There is no
compelling reason to name the downloaded file differently from its
source.
---
 .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py b/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
index 1291e580dde0..f3e96fd59a93 100755
--- a/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
+++ b/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
@@ -65,7 +65,6 @@ eprint(f"Supported platforms: {job_mapping.keys()}")
 class Artifact(NamedTuple):
     job_name: str
     download_name: str
-    output_name: str
     subdir: str
 
 # Platform spec provides a specification which is agnostic to Job
@@ -75,11 +74,9 @@ class PlatformSpec(NamedTuple):
     subdir: str
 
 source_artifact = Artifact('source-tarball'
-                          , 'ghc-{version}-src.tar.xz'
                           , 'ghc-{version}-src.tar.xz'
                           , 'ghc-{version}' )
 test_artifact = Artifact('source-tarball'
-                        , 'ghc-{version}-testsuite.tar.xz'
                         , 'ghc-{version}-testsuite.tar.xz'
                         , 'ghc-{version}/testsuite' )
 
@@ -164,11 +161,6 @@ def mk_one_metadata(release_mode, version, job_map, artifact):
           , "dlSubdir": artifact.subdir.format(version=version)
           , "dlHash" : h }
 
-    # Only add dlOutput if it is inconsistent with the filename inferred from the URL
-    output = artifact.output_name.format(version=version)
-    if Path(urlparse(final_url).path).name != output:
-        res["dlOutput"] = output
-
     eprint(res)
     return res
 
-- 
GitLab