diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-08-31 22:17:56 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-08-31 22:17:56 +0200 |
commit | 4720f524fcab388a5a8bd62a0adf5587e5026b96 (patch) | |
tree | 37f3042c82491ed67e71be911c3bd46d3abcb7ef /guix/scripts/package.scm | |
parent | ab3893d713764e64ce9e5f69e991405acf66c1a5 (diff) | |
download | gnu-guix-4720f524fcab388a5a8bd62a0adf5587e5026b96.tar gnu-guix-4720f524fcab388a5a8bd62a0adf5587e5026b96.tar.gz |
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 '().
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r-- | guix/scripts/package.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 6ecf37e1a6..95c0130c95 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -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 |