packages: 'find-packages-by-name' properly honors version prefixes.
authorLudovic Courtès <ludo@gnu.org>
Sun, 13 May 2018 10:16:34 +0000 (12:16 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sun, 13 May 2018 11:29:27 +0000 (13:29 +0200)
Fixes <https://bugs.gnu.org/28446>.
Reported by Mark H Weaver <mhw@netris.org>.

* gnu/packages.scm (find-packages-by-name): Use 'version-prefix?'
instead of 'string-prefix?'.

gnu/packages.scm

index 1a37a17..7b95476 100644 (file)
@@ -188,7 +188,7 @@ decreasing version order."
                             version>?)))
         (if version
             (filter (lambda (package)
-                      (string-prefix? version (package-version package)))
+                      (version-prefix? version (package-version package)))
                     matching)
             matching)))))