#1102127 licenesecheck: Files with multiple OR licensing options

#1102127#5
Date:
2025-04-05 05:34:02 UTC
From:
To:
Dear maintainer,

During reviewing 'tuiwidgets', I saw the following 'lrc' result.

philwyett@ks-tarkin:~/Development/builder/debian/tuiwidgets-0.2.2$ lrc
en: Versions: licenserecon '4.0'  licensecheck '3.3.9-1'

Parsing Source Tree  ....
Reading d/copyright  ....
Running licensecheck ....

d/copyright      | licensecheck

0BSD or BSL-1.0 or MIT-0| 0BSD              examples/demo.cpp
0BSD or BSL-1.0 or MIT-0| 0BSD              examples/demo.h

The corresponding 'debian/copyright' snippet is below.

Files: examples/demo.*
Copyright: 2022-2023 Christoph Hueffelmann
           2022-2023 Martin Hostettler
License: 0BSD or BSL-1.0 or MIT-0

Has 'or' for multiple license options yet to be implemented or do you see this
as another issue?

[1] https://tracker.debian.org/pkg/tuiwidgets

#1102127#18
Date:
2025-04-05 11:46:10 UTC
From:
To:
The first two lines of the files are;

// Feel free to copy from this example to your own code
// SPDX-License-Identifier: 0BSD OR BSL-1.0 OR MIT-0

but licensecheck detects the license as just 0BSD,
missing the 'OR BSL-1.0 OR MIT-0' part.

#1102127#25
Date:
2025-11-21 00:34:16 UTC
From:
To:
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