Bug#840077: licensecheck marks License unknown when license name is clearly declared in file
Jonas Smedegaard
dr at jones.dk
Fri May 15 12:24:40 BST 2020
Control: forcemerge -1 948890
Control: retitle -1 licensecheck: fails to detect short "License: *" declaration
Control: tags -1 -pending
Quoting Vasudev Kamath (2016-10-08 05:51:20)
> I was using licensecheck via CDBS on updated fontforge source files and I
> noticed several discrepancies in the output. One such is previously known
> License file is being marked as unknown license file.
[...]
> Lets see the header of Unicode/ArabicForms.c
>
> /* Copyright: 2001 George Williams */
> /* License: BSD-3-clause */
> /* Contributions: Khaled Hosny, Joe Da Silva */
>
> /* This file was generated using the program 'makeutype' for Unicode_version 9.0*/
>
> Its clearly marked as BSD-3-clause but now licensecheck declares it as unknown!.
>
> Similarly with Unicode/utype.c
>
> /* Copyright: 2001 George Williams */
> /* License: BSD-3-clause */
> /* Contributions: Werner Lemberg, Khaled Hosny, Joe Da Silva */
>
> I think what changed was additional Contributions: field, is this confusing
> licensecheck?. This is causing some confusion in new source.
Seems this is same issue as later reported by Dominique Dumont as
bug#948890: Licensecheck fails to detect simple declarative license on
the form "License: $name_of_license".
Main complication is that Licensecheck strips comments before scanning
for licensing patterns, and some programming languages use colon as a
comment marker. Trying to then scan for "license $something" leads to
too many false positives.
The solution is probably to stop strip comment markers, and instead when
scanning tolerate every space to maybe contain comment markers. This is
a radical change, that I will only try _after_ the current ongoing work
to cleaning the scanning to be far more well-structured and covered by a
testsuite - so that I can reasonably assess if the change is done
properly. I also fear that the scanner will become horribly slow with
such change, and I will have to consider another approach...
- Jonas
--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/
[x] quote me freely [ ] ask before reusing [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20200515/447f97da/attachment.sig>
More information about the pkg-perl-maintainers
mailing list