summaryrefslogtreecommitdiff
path: root/guix/substitutes.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-12-13 11:49:15 +0100
committerLudovic Courtès <ludo@gnu.org>2021-12-13 11:49:15 +0100
commit1052ae5f03de931b52c7a638c8e4f8d8d7093af3 (patch)
tree4913e4a7834f4ad6e44906d814cd46e7c21d981b /guix/substitutes.scm
parent869d69ad3248288ffe30264f5e5bd760792ca758 (diff)
parent788f56b4dc0729e07ad546c5bc9694759c271f09 (diff)
Merge branch 'master' into core-updates-frozen
Diffstat (limited to 'guix/substitutes.scm')
-rw-r--r--guix/substitutes.scm6
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))