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 '().
1 files changed, 5 insertions(+), 3 deletions(-) M guix/scripts/package.scm
M guix/scripts/package.scm => guix/scripts/package.scm +5 -3
@@ 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