mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
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>
This commit is contained in:
parent
af4fa7c00c
commit
e8a67f0fc4
1 changed files with 6 additions and 3 deletions
|
@ -485,9 +485,12 @@ (define (go-import->module-meta content-text)
|
|||
(match (select (html->sxml meta-data #:strict? #t))
|
||||
(() #f) ;nothing selected
|
||||
((('content content-text) ..1)
|
||||
(find (lambda (meta)
|
||||
(string-prefix? (module-meta-import-prefix meta) module-path))
|
||||
(map go-import->module-meta content-text))))))
|
||||
(or
|
||||
(find (lambda (meta)
|
||||
(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)
|
||||
"Return the URL where the fetcher which will be used can download the
|
||||
|
|
Loading…
Reference in a new issue