--- Begin Message ---
Subject: |
[PATCH 0/3] import/utils: spdx-string->license: Match case-insensitively and support '+' operator. |
Date: |
Wed, 19 Oct 2022 00:55:05 -0400 |
Hi,
This patch series changes 'spdx-string->license' to match SPDX license
identifiers case-insensitively (as the specification instructs) and
generalizes support for the '+' operator. It also corrects the docstring.
My concrete motivation is to more completely translate Racket's "license
S-expressions":
https://docs.racket-lang.org/pkg/metadata.html#(tech._license._s._expression)
For example, this package, which is part of the main Racket distribution, uses
the '+' operator: https://pkgs.racket-lang.org/package/scribble-lib
(In turn, my impetus for proposing license S-expressions for Racket was to be
able to use them in 'guix import racket'.)
-Philip
Philip McGrath (3):
import/utils: spdx-string->license: Fix incorrect docstring.
import/utils: spdx-string->license: Match case-insensitively.
import/utils: spdx-string->license: Support '+' operator.
guix/import/utils.scm | 261 ++++++++++++++++++++++--------------------
1 file changed, 140 insertions(+), 121 deletions(-)
base-commit: 3bb145b6e2a8c84e7739ead9ae76dc4d42bb9850
--
2.38.0
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#58621: [PATCH 0/3] import/utils: spdx-string->license: Match case-insensitively and support '+' operator. |
Date: |
Fri, 18 Nov 2022 14:45:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
Applied all three patches. I added trivial tests for
‘spdx-string->license’ and changed ‘substring’ to ‘string-drop-right’,
which I find clearer.
Philip McGrath <philip@philipmcgrath.com> skribis:
> + (and (string-suffix? "+" str)
> + ;; We try the form with the + to support deprecated identifiers for
> + ;; GNU licenses (see above). Here, we handle other uses of +.
> + (spdx-string->license
> + (substring str 0 (- (string-length str) 1)))))))
I guess we can remove the “+” forms from the alist now?
Thanks,
Ludo’.
--- End Message ---