me
/
guix
Archived
1
0
Fork 0

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 '().
master
Ludovic Courtès 2014-08-31 22:17:56 +02:00
parent ab3893d713
commit 4720f524fc
1 changed files with 5 additions and 3 deletions

View File

@ -305,10 +305,12 @@ current settings and report only settings not already effective."
;; 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