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.
This commit is contained in:
Ludovic Courtès 2021-01-20 11:35:10 +01:00
parent 41134f915f
commit 3d43b7aef3
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
3 changed files with 7 additions and 4 deletions

View File

@ -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)

View File

@ -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))
'()))

View File

@ -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)