diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-01-20 11:35:10 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-01-21 00:14:38 +0100 |
commit | 3d43b7aef3d5b7ad2ba0418d2afd657e5fedeaf5 (patch) | |
tree | 53f1b74f436171843008f65c0d8fc8c70162d1a5 /guix | |
parent | 41134f915f523601fa183f180b801a872b428fc3 (diff) |
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.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/import/cpan.scm | 3 | ||||
-rw-r--r-- | guix/import/gem.scm | 5 | ||||
-rw-r--r-- | guix/swh.scm | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index 514417f781..87abe9c2f1 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 1f6f94532e..418d716be6 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 0b765cc743..f11b7ea2d5 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) |