download: Use URI objects for content-addressed mirrors.
This fixes a bug whereby 'http-fetch' would be passed a string instead of a URI object. * guix/build/download.scm (url-fetch): Rename 'content-addressed-urls' to 'content-addressed-uris', and call 'string->uri'.
This commit is contained in:
parent
d345491ab4
commit
dab2472c6a
|
@ -719,11 +719,11 @@ or #f."
|
||||||
uri)
|
uri)
|
||||||
#f)))
|
#f)))
|
||||||
|
|
||||||
(define content-addressed-urls
|
(define content-addressed-uris
|
||||||
(append-map (lambda (make-url)
|
(append-map (lambda (make-url)
|
||||||
(filter-map (match-lambda
|
(filter-map (match-lambda
|
||||||
((hash-algo . hash)
|
((hash-algo . hash)
|
||||||
(make-url hash-algo hash)))
|
(string->uri (make-url hash-algo hash))))
|
||||||
hashes))
|
hashes))
|
||||||
content-addressed-mirrors))
|
content-addressed-mirrors))
|
||||||
|
|
||||||
|
@ -733,7 +733,7 @@ or #f."
|
||||||
|
|
||||||
(setvbuf (current-error-port) _IOLBF)
|
(setvbuf (current-error-port) _IOLBF)
|
||||||
|
|
||||||
(let try ((uri (append uri content-addressed-urls)))
|
(let try ((uri (append uri content-addressed-uris)))
|
||||||
(match uri
|
(match uri
|
||||||
((uri tail ...)
|
((uri tail ...)
|
||||||
(or (fetch uri file)
|
(or (fetch uri file)
|
||||||
|
|
Loading…
Reference in New Issue