guix-commits
[Top][All Lists]
Advanced

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

01/01: import: crate: Gracefully deal with missing license info.


From: Ludovic Courtès
Subject: 01/01: import: crate: Gracefully deal with missing license info.
Date: Mon, 8 Jan 2018 05:46:55 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 1e63ecee0b5e1d7e4894af5a51cceeba0092693c
Author: Ludovic Courtès <address@hidden>
Date:   Mon Jan 8 11:45:35 2018 +0100

    import: crate: Gracefully deal with missing license info.
    
    Reported by Fis Trivial <address@hidden>.
    Fixes <https://bugs.gnu.org/28987>.
    
    * guix/import/crate.scm (crate-fetch): Check whether the "license" info
    is present.
---
 guix/import/crate.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 233a20e..a7485bb 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -59,7 +59,9 @@
              (repository (assoc-ref crate "repository"))
              (synopsis (assoc-ref crate "description"))
              (description (assoc-ref crate "description"))
-             (license (string->license (assoc-ref crate "license")))
+             (license (or (and=> (assoc-ref crate "license")
+                                 string->license)
+                          '()))                   ;missing license info
              (path (string-append "/" version "/dependencies"))
              (deps-json (json-fetch (string-append crate-url name path)))
              (deps (assoc-ref deps-json "dependencies"))



reply via email to

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