From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GBt+OsuFT2PxPAEAbAwnHQ (envelope-from ) for ; Wed, 19 Oct 2022 07:06:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mEeBOsuFT2PedwAAauVa8A (envelope-from ) for ; Wed, 19 Oct 2022 07:06:19 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EF43B2A3A9 for ; Wed, 19 Oct 2022 07:06:18 +0200 (CEST) Received: from localhost ([::1]:32918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ol1HW-0006hj-22 for larch@yhetil.org; Wed, 19 Oct 2022 01:06:18 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666155979; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Zc8xR/Rfe3HBBiAq5450A9BOh0IUsTjn6mamBVeZE1U=; b=n/WHHI0syCt9LT5QZRqglU1hfcDJGUwZaE+bHcIVvPXXKt7VsHPSjPGIAkxhbnunSJBrp/ o18vjKT6EEp+xhpKFxwYQiBjBTlZnjU58mpE5e7XQMST7N5kf5N8LWj3tey4Uaf3M9ySnn dBvQg0Ds1UL9zO1dG0M+69thLRuTTTaqln+s4HdQcfhSgeIhiYGDi9xU9bNM38moyUU3PH a1NukCjgNyWq1FNUYUisE2chPYhuAX4ZG+I0eHPDlyDeC5AymJFtHWEPppBGskZTjwlMmK 1AWUuUGtsqFdBL6MCsxNdBT6a9DN2KuFffDU4zowAIACCDeaOspahOH2SkRS5g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666155979; a=rsa-sha256; cv=none; b=KzN1JcUOj2vL1SvbO0eO5vsob1LQ6k76iWUnBb9IXMf8FqusYWuZ7aAIMreiRRFPEZa2l7 HNDoYGjJud89tuAJZMiK+E87+nbpn8IZGbTNNyLCjnwq9lfPMciTvtCDLeQoi3uYfQZXMx +6b6QT6cNpZJog+n/Iq+T2JZHT6eJr4TE77shFweooQI4kayKsHoENj2kdvq7NoyEzMfPd +JE3WOFPykkWYZA6IoccGwnl4eSBOLLA6am0YQ3r86Ch//fFiiQeZ0NYFTrEG1DySYvcgG JHbqO/9yeRHDGiTUWr6Vwq+ePN4IWirwb0TWVbcyZjyQM9Km9uDUFj6ar7b6qg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm3 header.b=PrseJc4P; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b="K 7eLGOO"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.77 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm3 header.b=PrseJc4P; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b="K 7eLGOO"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EF43B2A3A9 X-Spam-Score: 2.77 X-Migadu-Scanner: scn0.migadu.com X-TUID: DAEtoURRZTpC 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:))) -- 2.38.0