GNU bug report logs -
#76220
[PATCH] import/npm-binary: Handle vector of licenses.
Previous Next
Reported by: Nicolas Graves <ngraves <at> ngraves.fr>
Date: Wed, 12 Feb 2025 08:23:02 UTC
Severity: normal
Tags: patch
Done: Nicolas Graves <ngraves <at> ngraves.fr>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76220 in the body.
You can then email your comments to 76220 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#76220
; Package
guix-patches
.
(Wed, 12 Feb 2025 08:23:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nicolas Graves <ngraves <at> ngraves.fr>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 12 Feb 2025 08:23:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I stumbled on this with the import of stream-spec. I don't know
however if that only happens for very old packages because they
weren't aligned with current practises.
* guix/import/npm-binary.scm (<package-revision>)[license]: Handle the
case where a vector of licenses is used.
---
guix/import/npm-binary.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/guix/import/npm-binary.scm b/guix/import/npm-binary.scm
index 92ac7d338e..bc5fd2d5d6 100644
--- a/guix/import/npm-binary.scm
+++ b/guix/import/npm-binary.scm
@@ -103,7 +103,17 @@ (define-json-mapping <package-revision> make-package-revision package-revision?
(match (assoc "type" alist)
((_ . (? string? type))
(spdx-string->license type))
- (_ #f)))))
+ (_ #f)))
+ ((? vector? vector)
+ (match (filter-map
+ (match-lambda
+ ((? string? str) (spdx-string->license str))
+ (_ #f))
+ (vector->list vector))
+ ((license rest ...)
+ (cons* license rest))
+ ((license)
+ license)))))
(description package-revision-description ;string
"description" empty-or-string)
(dist package-revision-dist "dist" json->dist)) ;dist
--
2.48.1
--
Best regards,
Nicolas Graves
Information forwarded
to
guix-patches <at> gnu.org
:
bug#76220
; Package
guix-patches
.
(Tue, 18 Feb 2025 17:10:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 76220 <at> debbugs.gnu.org (full text, mbox):
Hello,
Nicolas Graves <ngraves <at> ngraves.fr> skribis:
> I stumbled on this with the import of stream-spec. I don't know
> however if that only happens for very old packages because they
> weren't aligned with current practises.
>
> * guix/import/npm-binary.scm (<package-revision>)[license]: Handle the
> case where a vector of licenses is used.
Could you add a test case so it doesn’t come back to haunt us?
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#76220
; Package
guix-patches
.
(Sat, 08 Mar 2025 16:45:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 76220 <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> skribis:
> Nicolas Graves <ngraves <at> ngraves.fr> skribis:
>
>> I stumbled on this with the import of stream-spec. I don't know
>> however if that only happens for very old packages because they
>> weren't aligned with current practises.
>>
>> * guix/import/npm-binary.scm (<package-revision>)[license]: Handle the
>> case where a vector of licenses is used.
>
> Could you add a test case so it doesn’t come back to haunt us?
Kind reminder. :-)
Ludo'.
bug closed, send any further explanations to
76220 <at> debbugs.gnu.org and Nicolas Graves <ngraves <at> ngraves.fr>
Request was from
Nicolas Graves <ngraves <at> ngraves.fr>
to
control <at> debbugs.gnu.org
.
(Tue, 15 Apr 2025 06:35:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 13 May 2025 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.