diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-12-13 11:49:15 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-12-13 11:49:15 +0100 |
commit | 1052ae5f03de931b52c7a638c8e4f8d8d7093af3 (patch) | |
tree | 4913e4a7834f4ad6e44906d814cd46e7c21d981b /guix/substitutes.scm | |
parent | 869d69ad3248288ffe30264f5e5bd760792ca758 (diff) | |
parent | 788f56b4dc0729e07ad546c5bc9694759c271f09 (diff) | |
download | guix-patches-1052ae5f03de931b52c7a638c8e4f8d8d7093af3.tar guix-patches-1052ae5f03de931b52c7a638c8e4f8d8d7093af3.tar.gz |
Merge branch 'master' into core-updates-frozen
Diffstat (limited to 'guix/substitutes.scm')
-rw-r--r-- | guix/substitutes.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/substitutes.scm b/guix/substitutes.scm index a5c554acff..9014cf61ec 100644 --- a/guix/substitutes.scm +++ b/guix/substitutes.scm @@ -156,7 +156,11 @@ indicates that PATH is unavailable at CACHE-URL." (define (narinfo-request cache-url path) "Return an HTTP request for the narinfo of PATH at CACHE-URL." - (let* ((base (string->uri cache-url)) + ;; Ensure BASE has a trailing slash so that REF is correct regardless of + ;; whether the user-provided CACHE-URL has a trailing slash. + (let* ((base (string->uri (if (string-suffix? "/" cache-url) + cache-url + (string-append cache-url "/")))) (ref (build-relative-ref #:path (string-append (store-path-hash-part path) ".narinfo"))) (url (resolve-uri-reference ref base)) |