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 @@ (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