From 3d43b7aef3d5b7ad2ba0418d2afd657e5fedeaf5 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 20 Jan 2021 11:35:10 +0100 Subject: import, swh: Adjust to Guile-JSON 4.5.x unspecified value handling. * guix/import/cpan.scm ()[home-page]: Add 'unspecified?' case. * guix/import/gem.scm ()[licenses]: Likewise. (json->gem-dependency-list): Likewise. * guix/swh.scm ()[checksums]: Likewise. --- guix/import/cpan.scm | 3 ++- guix/import/gem.scm | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'guix/import') 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 ;;; Copyright © 2016 Alex Sassmannshausen ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice -;;; Copyright © 2020 Ludovic Courtès +;;; Copyright © 2020, 2021 Ludovic Courtès ;;; ;;; 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 ;;; Copyright © 2016 Ben Woodcroft ;;; Copyright © 2018 Oleg Pykhalov -;;; Copyright © 2020 Ludovic Courtès +;;; Copyright © 2020, 2021 Ludovic Courtès ;;; Copyright © 2020 Martin Becze ;;; ;;; 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)) '())) -- cgit v1.2.3