From patchwork Wed Oct 19 05:04:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 43709 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7BB6027BBE9; Wed, 19 Oct 2022 06:06:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5DF9E27BBED for ; Wed, 19 Oct 2022 06:06:25 +0100 (BST) Received: from localhost ([::1]:32918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ol1Hc-0006hj-BW for patchwork@mira.cbaines.net; Wed, 19 Oct 2022 01:06:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ol1HG-0006gT-FS for guix-patches@gnu.org; Wed, 19 Oct 2022 01:06:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ol1HG-0004tw-68 for guix-patches@gnu.org; Wed, 19 Oct 2022 01:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ol1HF-0003Yg-Sg for guix-patches@gnu.org; Wed, 19 Oct 2022 01:06:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58621] [PATCH 1/3] import/utils: spdx-string->license: Fix incorrect docstring. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Oct 2022 05:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58621 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58621@debbugs.gnu.org Cc: Philip McGrath Received: via spool by 58621-submit@debbugs.gnu.org id=B58621.166615591413593 (code B ref 58621); Wed, 19 Oct 2022 05:06:01 +0000 Received: (at 58621) by debbugs.gnu.org; 19 Oct 2022 05:05:14 +0000 Received: from localhost ([127.0.0.1]:55483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol1GT-0003XB-KI for submit@debbugs.gnu.org; Wed, 19 Oct 2022 01:05:14 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:44889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol1GQ-0003Wt-Hw for 58621@debbugs.gnu.org; Wed, 19 Oct 2022 01:05:12 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 459E05C0186; Wed, 19 Oct 2022 01:05:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 19 Oct 2022 01:05:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1666155905; x=1666242305; bh=Zc8xR/Rfe3 HBBiAq5450A9BOh0IUsTjn6mamBVeZE1U=; b=PrseJc4PlTHE6N8FFn4LAvc9gK dRDV0JWK4CXTXdKSEx4dYjSBsmQdkBaA03yBPquCZM37XQh7sMeJCpB7xVdPq5HM cA3pi1MG/Yz486H0K6KQh6HzuGm6osEQsrjjpEf7ExjRlqfR2QlrRy/5CFbrqG/f 8NpbZuhlCnM2YB9FHS0caWOFKTTPADDPSmxI+DZbtf8UutUhQtPGe0tzXfpYhEwN L0j5K6rSJ5hZL8+dKLcqihAzRt4Az6so6l6nO3jpx8uumgp1nHrwcnDKMrOLdPL1 Z+RBOxLKIQamy44E7PO6XHNFZRjB9FvC8tQd8R7e+hz8Zvaom1MHaD5PJtHA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1666155905; x= 1666242305; bh=Zc8xR/Rfe3HBBiAq5450A9BOh0IUsTjn6mamBVeZE1U=; b=K 7eLGOOjHhwpm9F1FhMbSlEgY5o65lJCIxuuSZZkLlEEyTuynribllqZrewWqjLbr d0IDEmpBRZPhWhdkyII9kbT1pO/OMADVWSy1dXjCWRLZg/TLC64gOJ6fnZKjPO8U rhwuO+PZCnh/9/HbcOtCuBffZlC3KiVhrj3EB3ajqN2jTWxyt78P2rPVxyEGJZOZ rM9WUHmQJ2K8Wg+WschSAvVHf8ie2+ugQRpZ/R9C2y9g+JG5rdtxO5sq239N/5sA 6yABuYhR2viomvEGo+SVNo67FRD2nyUdIOPd4MXXkfdclTabDY/cBX2WbUjrBeQk 5clhlceuivilFGodfiFsQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeelfedgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdludejmdenucfjughrpefhvf evufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheprfhhihhlihhpucfotgfi rhgrthhhuceophhhihhlihhpsehphhhilhhiphhmtghgrhgrthhhrdgtohhmqeenucggtf frrghtthgvrhhnpeeuveekgeelteeuleetvedvudelhfegueefhfdvfeffveeludfhtddv ieelgeffteenucffohhmrghinhepshhpugigrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphhhihhlihhpsehphhhilhhiphhmtghg rhgrthhhrdgtohhm X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Oct 2022 01:05:04 -0400 (EDT) From: Philip McGrath Date: Wed, 19 Oct 2022 01:04:47 -0400 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches The result of 'spdx-string->license' is a symbol, not a license object. * guix/import/utils.scm (spdx-string->license): Fix docstring. (license->symbol): Mention 'license:' prefix in docstring. --- guix/import/utils.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index 5420037d1d..6afb009a00 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2022 Alice Brenon ;;; Copyright © 2022 Kyle Meyer +;;; Copyright © 2022 Philip McGrath ;;; ;;; This file is part of GNU Guix. ;;; @@ -131,8 +132,9 @@ (define (guix-hash-url filename) (bytevector->nix-base32-string (file-sha256 filename))) (define (spdx-string->license str) - "Convert STR, a SPDX formatted license identifier, to a license object. - Return #f if STR does not match any known identifiers." + "Convert STR, an SPDX license identifier, to a symbol like 'license:gpl3+ +giving the prefixed name of a license object exported from (guix licenses). +Return #f if STR does not match any known SPDX license identifiers." ;; https://spdx.org/licenses/ ;; The gfl1.0, nmap, repoze ;; licenses doesn't have SPDX identifiers @@ -257,8 +259,9 @@ (define (spdx-string->license str) (_ #f))) (define (license->symbol license) - "Convert license to a symbol representing the variable the object is bound -to in the (guix licenses) module, or #f if there is no such known license." + "Convert LICENSE object to a prefixed symbol representing the variable the +object is bound to in the (guix licenses) module, such as 'license:gpl3+, or +#f if there is no such known license." (define licenses (module-map (lambda (sym var) `(,(variable-ref var) . ,sym)) (resolve-interface '(guix licenses) #:prefix 'license:)))