mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
upstream: Use first url when it lacks an extension.
* guix/upstream.scm (package-update): Use a url from the list when it lacks an extension.
This commit is contained in:
parent
ce3f92e701
commit
af72a21a69
1 changed files with 6 additions and 2 deletions
|
@ -241,12 +241,16 @@ (define* (package-update store package updaters
|
|||
((archive-type)
|
||||
(match (and=> (package-source package) origin-uri)
|
||||
((? string? uri)
|
||||
(or (file-extension uri) "gz"))
|
||||
(file-extension uri))
|
||||
(_
|
||||
"gz")))
|
||||
((url signature-url)
|
||||
(find2 (lambda (url sig-url)
|
||||
(string-suffix? archive-type url))
|
||||
;; Some URIs lack a file extension, like
|
||||
;; 'https://crates.io/???/0.1/download'. In that
|
||||
;; case, pick the first URL.
|
||||
(or (not archive-type)
|
||||
(string-suffix? archive-type url)))
|
||||
urls
|
||||
(or signature-urls (circular-list #f)))))
|
||||
(let ((tarball (download-tarball store url signature-url
|
||||
|
|
Loading…
Reference in a new issue