Bug#1139580: libstring-license-perl: seems unable to notice -or-later in SPDX-License-Identifiers
Philip Hands
phil at hands.com
Tue Jun 9 23:54:45 BST 2026
Package: libstring-license-perl
Version: 0.0.11-1
Severity: normal
X-Debbugs-Cc: 1135671 at bugs.debian.org
[I would guess that this is the same bug as 1135671, in which case they should
probably be merged]
Hi,
Prompted by `lrc` telling me that a file that contains:
SPDX-License-Identifier: GPL-2.0-or-later.
has a license of 'GPL-2', rather than 'GPL-2+', I thought I'd try to work out
why that is.
I didn't manage to track down exactly why it does that, but I do have a couple
of minimal tests that suggest that it is due to String::License
$ perl -M5.010 -MString::License -e 'say String::License->new( string => "under the terms of GNU General Public License either version 2, or later." )->as_text'
GPL-2.0-or-later
$ perl -M5.010 -MString::License -e 'say String::License->new( string => "SPDX-License-Identifier: GPL-2.0-or-later." )->as_text'
GPL-2
It seems to me that the second one of those should also be producing
"GPL-2.0-or-later", rather than "GPL-2".
I did try pointing the perl debugger at that, but I'm afraid that all that
revealed was that it's a very long time since I tried to debug any perl :-/
My totally unfounded guess would be that something is finding a match on
'GPL-2.0' and stopping, when it should either continue, or preferably have first
checked for a match for the whole string including the '-or-later'
In case it helps to have the real example to look at, the file that was
misidentified is here:
https://salsa.debian.org/debian/openqa/-/blob/debian/latest/t/43-cli-api.t?ref_type=heads#L2
and you can see that misidentification here:
https://dfsg-new-queue.debian.org/reviews/openqa-server
HTH
Cheers, Phil.
-- System Information:
Debian Release: 13.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable'), (100, 'trixie-fasttrack'), (99, 'unstable'), (90, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.90+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages libstring-license-perl depends on:
ii libarray-intspan-perl 2.004-2
ii libfeature-compat-class-perl 0.07-1
ii liblog-any-perl 1.717-1
ii libnamespace-clean-perl 0.27-2
ii libobject-pad-perl 0.820-1
ii libpath-tiny-perl 0.148-1
ii libregexp-pattern-license-perl 3.11.2-1
ii libregexp-pattern-perl 0.2.14-2
ii perl 5.40.1-6
Versions of packages libstring-license-perl recommends:
ii libre-engine-re2-perl 0.18+ds-2
ii libregexp-pattern-license-perl 3.11.2-1
libstring-license-perl suggests no packages.
-- no debconf information
More information about the pkg-perl-maintainers
mailing list