all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
To: guix-devel@gnu.org
Cc: Alex Sassmannshausen <alex@pompo.co>
Subject: [PATCH] import/cpan: Maybe coerce version to string.
Date: Sat, 12 Nov 2016 18:20:05 +0100	[thread overview]
Message-ID: <20161112172005.4445-2-alex@pompo.co> (raw)
In-Reply-To: <20161112172005.4445-1-alex@pompo.co>

* guix/import/cpan.scm (cpan-module->sexp) <version>: Test if version in
  meta is string or number.  If it is number, coerce to string.
---
 guix/import/cpan.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 5b7c475..d244969 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -128,7 +128,9 @@ META."
         (string-append "perl-" (string-downcase name))))
 
   (define version
-    (assoc-ref meta "version"))
+    (match (assoc-ref meta "version")
+      ((? number? vrs) (number->string vrs))
+      ((? string? vrs) vrs)))
 
   (define core-module?
     (let ((perl-version (package-version perl))
-- 
2.10.1

  reply	other threads:[~2016-11-12 17:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-12 17:20 [PATCH] import/cpan: Maybe coerce version to string Alex Sassmannshausen
2016-11-12 17:20 ` Alex Sassmannshausen [this message]
2016-11-13 12:13   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161112172005.4445-2-alex@pompo.co \
    --to=alex.sassmannshausen@gmail.com \
    --cc=alex@pompo.co \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.