guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: import: cpan: Drop "v" prefix from version strings.


From: Ludovic Courtès
Subject: 01/01: import: cpan: Drop "v" prefix from version strings.
Date: Thu, 1 Mar 2018 08:57:08 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit b402f4ee34d35f9b934b5449d2cc419dc287895e
Author: Ludovic Courtès <address@hidden>
Date:   Thu Mar 1 14:54:55 2018 +0100

    import: cpan: Drop "v" prefix from version strings.
    
    Fixes <https://bugs.gnu.org/30641>.
    Reported by Oleg Pykhalov <address@hidden>.
    
    * guix/import/cpan.scm (cpan-version): Drop the "v" prefix when it is
    there.
---
 guix/import/cpan.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 2ef02c4..58c051e 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -131,7 +131,11 @@ or #f on failure.  MODULE should be e.g. \"Test::Script\""
      ;; version is sometimes not quoted in the module json, so it gets
      ;; imported into Guile as a number, so convert it to a string.
      (number->string version))
-    (version version)))
+    (version
+     ;; Sometimes we get a "v" prefix.  Strip it.
+     (if (string-prefix? "v" version)
+         (string-drop version 1)
+         version))))
 
 (define (perl-package)
   "Return the 'perl' package.  This is a lazy reference so that we don't



reply via email to

[Prev in Thread] Current Thread [Next in Thread]