[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/12: import/utils: spdx-string->license: Fix incorrect docstring.
From: |
guix-commits |
Subject: |
02/12: import/utils: spdx-string->license: Fix incorrect docstring. |
Date: |
Fri, 18 Nov 2022 09:49:12 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit b253efef2315ec0bbd5dce1272591d51a2daef0e
Author: Philip McGrath <philip@philipmcgrath.com>
AuthorDate: Wed Oct 19 01:04:47 2022 -0400
import/utils: spdx-string->license: Fix incorrect docstring.
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.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
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 <public@yoctocell.xyz>
;;; Copyright © 2022 Alice Brenon <alice.brenon@ens-lyon.fr>
;;; Copyright © 2022 Kyle Meyer <kyle@kyleam.com>
+;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -131,8 +132,9 @@ of the string VERSION is replaced by the symbol 'version."
(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 @@ of the string VERSION is replaced by the symbol 'version."
(_ #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:)))
- 03/12: import/utils: spdx-string->license: Match case-insensitively., (continued)
- 03/12: import/utils: spdx-string->license: Match case-insensitively., guix-commits, 2022/11/18
- 10/12: services: Add Shepherd 'configuration' action to various services., guix-commits, 2022/11/18
- 04/12: import/utils: spdx-string->license: Support '+' operator., guix-commits, 2022/11/18
- 01/12: linux-initrd: raw-initrd: Add keyword argument #:pre-mount., guix-commits, 2022/11/18
- 12/12: services: tor: Remove unnecessary modules from shepherd environment., guix-commits, 2022/11/18
- 06/12: gnu: s3cmd: Fix program name in output., guix-commits, 2022/11/18
- 07/12: gnu: tbb: Update to 2021.6.0., guix-commits, 2022/11/18
- 09/12: services: shepherd: Define 'shepherd-configuration-action' helper., guix-commits, 2022/11/18
- 08/12: gnu: timescaledb: Update to 2.8.1., guix-commits, 2022/11/18
- 11/12: home: services: redshift: Add 'configuration' action., guix-commits, 2022/11/18
- 02/12: import/utils: spdx-string->license: Fix incorrect docstring.,
guix-commits <=
- 05/12: gnu: Add wld., guix-commits, 2022/11/18