Bug#1102127: licensecheck: source formats: cover OR in SPDX naming syntax
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Fri Nov 21 00:34:16 GMT 2025
Phil described that in
// SPDX-License-Identifier: 0BSD or BSL-1.0 or MIT-0
only the first item '0BSD' is discovered.
Current usage is to add parentheses. In
// SPDX-License-Identifier: ( 0BSD or BSL-1.0 or MIT-0 )
no item is discovered at all.
For stepping over the leading parenthesis the following diff could be
used as a fix:
--- Regexp/Pattern/License.pm 2024-08-21 21:12:10.000000000 +0200
+++ Regexp/Pattern/License.pm 2025-11-20 22:32:20.097783678 +0100
@@ -1721,7 +1721,7 @@
],
'pat.alt.subject.trait' =>
- '(?P<_license_label_spdx>SPDX[-]License[-]Identifier[:] )',
+ '(?P<_license_label_spdx>SPDX[-]License[-]Identifier[:]
[ \(]*)',
};
$RE{license_label_trove} = {
Furthermore invalid SPDX identifiers are accepted:
// SPDX-License-Identifier: gnu-general-public-license-v2
// SPDX-License-Identifier: GNUGPLv2
Best regards
Heinrich
More information about the pkg-perl-maintainers
mailing list