mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-16 19:57:39 -05:00
guix package: Fix search path lookup when an obsolete version is installed.
Before that, 'guix package --search-paths' would not work if, say, 'foo-0.2' is installed but the distro provides 'foo-0.3'. * guix/scripts/package.scm (search-path-environment-variables)[manifest-entry->package]: Handle the case where 'find-best-packages-by-name' returns '().
This commit is contained in:
parent
ab3893d713
commit
4720f524fc
1 changed files with 5 additions and 3 deletions
|
@ -305,10 +305,12 @@ (define manifest-entry->package
|
|||
;; Use 'find-best-packages-by-name' and not 'find-packages-by-name';
|
||||
;; the former traverses the module tree only once and then allows for
|
||||
;; efficient access via a vhash.
|
||||
(match (or (find-best-packages-by-name name version)
|
||||
(find-best-packages-by-name name #f))
|
||||
(match (find-best-packages-by-name name version)
|
||||
((p _ ...) p)
|
||||
(_ #f)))))
|
||||
(_
|
||||
(match (find-best-packages-by-name name #f)
|
||||
((p _ ...) p)
|
||||
(_ #f)))))))
|
||||
|
||||
(define search-path-definition
|
||||
(match-lambda
|
||||
|
|
Loading…
Reference in a new issue