import: go: Fix import when import path redirects.
* guix/import/go.scm (fetch-module-meta-data): If no meta entries have a matching import prefix, return the first entry instead of #f. Signed-off-by: Ludovic Courtès <ludo@gnu.org>master
parent
af4fa7c00c
commit
e8a67f0fc4
|
@ -485,9 +485,12 @@ build a package."
|
||||||
(match (select (html->sxml meta-data #:strict? #t))
|
(match (select (html->sxml meta-data #:strict? #t))
|
||||||
(() #f) ;nothing selected
|
(() #f) ;nothing selected
|
||||||
((('content content-text) ..1)
|
((('content content-text) ..1)
|
||||||
(find (lambda (meta)
|
(or
|
||||||
(string-prefix? (module-meta-import-prefix meta) module-path))
|
(find (lambda (meta)
|
||||||
(map go-import->module-meta content-text))))))
|
(string-prefix? (module-meta-import-prefix meta) module-path))
|
||||||
|
(map go-import->module-meta content-text))
|
||||||
|
;; Fallback to the first meta if no import prefixes match.
|
||||||
|
(go-import->module-meta (first content-text)))))))
|
||||||
|
|
||||||
(define (module-meta-data-repo-url meta-data goproxy)
|
(define (module-meta-data-repo-url meta-data goproxy)
|
||||||
"Return the URL where the fetcher which will be used can download the
|
"Return the URL where the fetcher which will be used can download the
|
||||||
|
|
Reference in New Issue