X-Loop: help-debbugs@HIDDEN Subject: [bug#76220] [PATCH] import/npm-binary: Handle vector of licenses. Resent-From: Nicolas Graves <ngraves@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 12 Feb 2025 08:23:02 +0000 Resent-Message-ID: <handler.76220.B.173934854714402 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 76220 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76220 <at> debbugs.gnu.org X-Debbugs-Original-To: guix-patches@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.173934854714402 (code B ref -1); Wed, 12 Feb 2025 08:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Feb 2025 08:22:27 +0000 Received: from localhost ([127.0.0.1]:60718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ti80p-0003kD-3B for submit <at> debbugs.gnu.org; Wed, 12 Feb 2025 03:22:27 -0500 Received: from lists.gnu.org ([2001:470:142::17]:41322) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ngraves@HIDDEN>) id 1ti80k-0003jp-Qk for submit <at> debbugs.gnu.org; Wed, 12 Feb 2025 03:22:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ngraves@HIDDEN>) id 1ti80c-0008QB-TY for guix-patches@HIDDEN; Wed, 12 Feb 2025 03:22:16 -0500 Received: from 10.mo581.mail-out.ovh.net ([178.33.250.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ngraves@HIDDEN>) id 1ti80X-00010f-9I for guix-patches@HIDDEN; Wed, 12 Feb 2025 03:22:12 -0500 Received: from director2.ghost.mail-out.ovh.net (unknown [10.109.140.166]) by mo581.mail-out.ovh.net (Postfix) with ESMTP id 4YtBB41FCrz1DSx for <guix-patches@HIDDEN>; Wed, 12 Feb 2025 08:22:03 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-8ll4c (unknown [10.110.168.159]) by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id B77D31FEAD for <guix-patches@HIDDEN>; Wed, 12 Feb 2025 08:22:03 +0000 (UTC) Received: from ngraves.fr ([37.59.142.97]) by ghost-submission-5b5ff79f4f-8ll4c with ESMTPSA id aWJCICtarGcSCwAAJhJUqg (envelope-from <ngraves@HIDDEN>) for <guix-patches@HIDDEN>; Wed, 12 Feb 2025 08:22:03 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-97G0020d14bdd4-4c4a-4ae7-8b87-1627215c1471, 62BFB7A69F7B9EF72AEEFD1B5628889879A671A4) smtp.auth=ngraves@HIDDEN X-OVh-ClientIp: 90.92.117.144 From: Nicolas Graves <ngraves@HIDDEN> Date: Wed, 12 Feb 2025 01:03:10 +0100 Message-ID: <87wmdvmv2s.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 6497286888980341498 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegfeeflecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvufffkfggtgesthdtredttddttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeeujeelieeljeffhfelteejtdeljeehveduffelvefgudefkeehgfdvvdevgeevfeenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggedpfeejrdehledrudegvddrleejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekudgmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=dVIbqS+1R12HO1LeXevTrxH2yzf3JEBjm+naaCaC3II=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1739348524; v=1; b=g0pJs73a7BtCkvTpdF6dQdlVP2Uu03OSDphTo3mqHgqZewJiZjbQ6q4lJH3XM4/Uxer2Q9EZ RudyGmEiCDlCDazauRd6OojgWvyJlkRs2ngKXx7S3U7nyThZZUdp8vaklmNr42fr077cTGrzQs4 aib8gwz2/FLEQuL372wzyQIiPnWQvy++pZN6ZKeijg6vj9rt5EhkVR6N8ekpSf4oX4bL+e+3B4V 4XL6UG7FAprN7xKfv4spYaDMqlWhs8kFi+Jjtui8IMLMUs9U6/C9PbvGjlrGVCikeU8O1XitkKL Z6EN4xgUo6O7dXzzCMWQf0lJ3SZhlhlLYjzrUut80Xc3A== Received-SPF: pass client-ip=178.33.250.56; envelope-from=ngraves@HIDDEN; helo=10.mo581.mail-out.ovh.net X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.1 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 del [...] Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 del [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 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
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Nicolas Graves <ngraves@HIDDEN> Subject: bug#76220: Acknowledgement ([PATCH] import/npm-binary: Handle vector of licenses.) Message-ID: <handler.76220.B.173934854714402.ack <at> debbugs.gnu.org> References: <87wmdvmv2s.fsf@HIDDEN> X-Gnu-PR-Message: ack 76220 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 76220 <at> debbugs.gnu.org Date: Wed, 12 Feb 2025 08:23:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 76220 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 76220: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76220 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.