On Wednesday 29 August 2007, Tom "spot" Callaway wrote:
On Wed, 2007-08-29 at 15:31 -0400, Todd Zullinger wrote:
> Several perl packages (including perl itself) use the license tag:
>
> (GPL+ or Artistic) and (GPLv2+ or Artistic)
>
> This isn't being parsed correctly by the regex used in rpmlint (which
> I've stolen and used in the check-licenses script). The regex is:
>
> '\s(?:and|or)\s|[()]'
>
> Does anyone have suggestions for improving this regex so it won't fail
> to parse the above license tag and others like it?
How did that regex get in there?
That's how I committed it.
When I did the first pass of the changes for rpmlint, this was my
regex:
'\sand\s|\sor\s|\(|\)'
The version currently in rpmlint works equivalently to that.
It works properly on the perl license tag, with the exception that
GPL+
or Artistic and GPLv2+ or Artistic are ok, and should be special cased
in rpmlint and your script (just Artistic is not OK).
I mentioned to you in private mail that the "or" in "GPL+ or Artistic"
will
cause problems in rpmlint with its current implementation of the license tag
check. When "GPL+ or Artistic" used alone, it works because that string is
in the license list as is and thus no splitting will occur. But when
combined with anything else (or even put in parenthesis), it no longer works
as intended because the special case is no longer found as is, and thus will
be split at "or" and the split parts are checked separately.
By the way, "GPLv2+ or Artistic" is not in the license list in Wiki nor thus
in rpmlint.