[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: import, swh: Adjust to Guile-JSON 4.5.x unspecified value handlin
From: |
guix-commits |
Subject: |
01/04: import, swh: Adjust to Guile-JSON 4.5.x unspecified value handling. |
Date: |
Wed, 20 Jan 2021 18:19:30 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 3d43b7aef3d5b7ad2ba0418d2afd657e5fedeaf5
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Jan 20 11:35:10 2021 +0100
import, swh: Adjust to Guile-JSON 4.5.x unspecified value handling.
* guix/import/cpan.scm (<cpan-release>)[home-page]: Add 'unspecified?'
case.
* guix/import/gem.scm (<gem>)[licenses]: Likewise.
(json->gem-dependency-list): Likewise.
* guix/swh.scm (<directory-entry>)[checksums]: Likewise.
---
guix/import/cpan.scm | 3 ++-
guix/import/gem.scm | 5 +++--
guix/swh.scm | 3 ++-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 514417f..87abe9c 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -109,6 +109,7 @@
(home-page cpan-release-home-page "resources"
(match-lambda
(#f #f)
+ ((? unspecified?) #f)
((lst ...) (assoc-ref lst "homepage"))))
(dependencies cpan-release-dependencies "dependency"
(lambda (vector)
diff --git a/guix/import/gem.scm b/guix/import/gem.scm
index 1f6f945..418d716 100644
--- a/guix/import/gem.scm
+++ b/guix/import/gem.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
-;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;;
;;; This file is part of GNU Guix.
@@ -49,6 +49,7 @@
;; This is sometimes #nil (the JSON 'null' value). Arrange
;; to always return a list.
(cond ((not licenses) '())
+ ((unspecified? licenses) '())
((vector? licenses) (vector->list licenses))
(else '()))))
(info gem-info)
@@ -69,7 +70,7 @@
json->gem-dependency-list))
(define (json->gem-dependency-list vector)
- (if vector
+ (if (and vector (not (unspecified? vector)))
(map json->gem-dependency (vector->list vector))
'()))
diff --git a/guix/swh.scm b/guix/swh.scm
index 0b765cc..f11b7ea 100644
--- a/guix/swh.scm
+++ b/guix/swh.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
@@ -348,6 +348,7 @@ FALSE-IF-404? is true, return #f upon 404 responses."
(checksums directory-entry-checksums "checksums"
(match-lambda
(#f #f)
+ ((? unspecified?) #f)
(lst (json->checksums lst))))
(id directory-entry-id "dir_id")
(length directory-entry-length)