From 348987d3d12ebaf11fdbcc3dbd56585e7d69a1f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Sun, 13 May 2018 12:16:34 +0200
Subject: [PATCH] packages: 'find-packages-by-name' properly honors version
 prefixes.

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages.scm b/gnu/packages.scm
index 1a37a173427..7b954769e96 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -188,7 +188,7 @@ (define find-packages-by-name
                             version>?)))
         (if version
             (filter (lambda (package)
-                      (string-prefix? version (package-version package)))
+                      (version-prefix? version (package-version package)))
                     matching)
             matching)))))
 
-- 
GitLab