aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-03-01 14:54:55 +0100
committerLudovic Courtès <ludo@gnu.org>2018-03-01 14:54:55 +0100
commitb402f4ee34d35f9b934b5449d2cc419dc287895e (patch)
tree62b845f2c526ae736034ad9e90fd152573b81c53 /guix
parent35e2d0cfaeb2d97965f385f859a5b5063cd4ac46 (diff)
downloadguix-b402f4ee34d35f9b934b5449d2cc419dc287895e.tar
guix-b402f4ee34d35f9b934b5449d2cc419dc287895e.tar.gz
import: cpan: Drop "v" prefix from version strings.
Fixes <https://bugs.gnu.org/30641>. Reported by Oleg Pykhalov <go.wigust@gmail.com>. * guix/import/cpan.scm (cpan-version): Drop the "v" prefix when it is there.
Diffstat (limited to 'guix')
-rw-r--r--guix/import/cpan.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 2ef02c43a4..58c051e283 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