Skip to content
Snippets Groups Projects
Unverified Commit b402f4ee authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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.
parent 35e2d0cf
No related branches found
No related tags found
No related merge requests found
...@@ -131,7 +131,11 @@ (define (cpan-version meta) ...@@ -131,7 +131,11 @@ (define (cpan-version meta)
;; version is sometimes not quoted in the module json, so it gets ;; version is sometimes not quoted in the module json, so it gets
;; imported into Guile as a number, so convert it to a string. ;; imported into Guile as a number, so convert it to a string.
(number->string version)) (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) (define (perl-package)
"Return the 'perl' package. This is a lazy reference so that we don't "Return the 'perl' package. This is a lazy reference so that we don't
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment