From 7b4b6539003860ff85a0f09b74be5fac241e4956 Mon Sep 17 00:00:00 2001 From: Kate Date: Mon, 18 Nov 2024 14:46:13 +0000 Subject: [PATCH 1/2] Make curl the default download tool instead of wget on macOS wget was the default despite not being in macOS because of #2006. However this was fixed and is not needed anymore --- master_changes.md | 1 + src/repository/opamRepositoryConfig.ml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/master_changes.md b/master_changes.md index 935996f6c44..bc2c04e23cc 100644 --- a/master_changes.md +++ b/master_changes.md @@ -115,6 +115,7 @@ users) ## Shell ## Internal + * Make `curl` the default download tool instead of `wget` on macOS [#6304 @kit-ty-kate] ## Internal: Windows diff --git a/src/repository/opamRepositoryConfig.ml b/src/repository/opamRepositoryConfig.ml index 306f3be8237..8d5477519a2 100644 --- a/src/repository/opamRepositoryConfig.ml +++ b/src/repository/opamRepositoryConfig.ml @@ -59,8 +59,7 @@ let default = { let curl = "curl", `Curl in let tools = match os with - | Darwin -> ["wget", `Default; curl] - | FreeBSD -> ["fetch", `Default ; curl] + | FreeBSD -> ["fetch", `Default; curl] | OpenBSD -> ["ftp", `Default; curl] | _ -> [curl; "wget", `Default] in From 16a20196fd053a6d2e5ca9e90e2e795282d0652c Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Mon, 18 Nov 2024 18:03:44 +0100 Subject: [PATCH 2/2] Add a comment to keep synchronised default download tool selection --- src/client/opamInitDefaults.ml | 1 + src/repository/opamRepositoryConfig.ml | 1 + 2 files changed, 2 insertions(+) diff --git a/src/client/opamInitDefaults.ml b/src/client/opamInitDefaults.ml index 6b5a7017fbf..0a9e5d6d4ef 100644 --- a/src/client/opamInitDefaults.ml +++ b/src/client/opamInitDefaults.ml @@ -96,6 +96,7 @@ let req_dl_tools () = let msg = Some "A download tool is required, check env variables OPAMCURL or OPAMFETCH" in + (* Keep synchronised with [OpamRepositoryConfig.default] *) let default = [ ["curl"; "wget"], msg, Some not_open_free_bsd_filter; diff --git a/src/repository/opamRepositoryConfig.ml b/src/repository/opamRepositoryConfig.ml index 8d5477519a2..6b2a3b5938f 100644 --- a/src/repository/opamRepositoryConfig.ml +++ b/src/repository/opamRepositoryConfig.ml @@ -53,6 +53,7 @@ type 'a options_fun = 'a let default = { + (* Keep synchronised with [OpamInitDefaults.req_dl_tools] *) download_tool = lazy ( let os = OpamStd.Sys.os () in try