latest licensecheck changes break --recursive option [Re: licensecheck testing and bug triage]

Nicholas Bamber nicholas at periapt.co.uk
Thu Nov 26 14:22:45 UTC 2015


Dominique,

On 25/11/15 20:56, Nicholas Bamber wrote:
> On 19/11/15 16:33, Dominique Dumont wrote:
>
>>> 2.) I was wondering about all the test scraps in the test/licensecheck .
>>> We could (or perhaps more realistically "could if we writing the tests
>>> now") get the test data from the Software::License module.
>>
>> Err, as far as I know, there's no examples of file headers in
>> Software::License
>> module to test license data extraction.
>>
>> Did I miss something ?
>>
>
> I have had a play with this, and I agree we can't do away with hand
> crafted test files. However my proof of concept script generates quite a
> few files that licensecheck cannot identify. I think licensecheck
> keeping up with Software::License would be a good test of comprehesiveness.
>
> Also I looked through the bug reports that are in this area.
>
> I have offered a patch for #559429.
>
> I think we should merge #660451, #688088  and #688843 and retitle it
> "generates false matches in BSD variant licenses". I reckon that needs
> some work though it will be tricky.
>
> I also marked #513967 wontfix based on my reading of the report.


I have identified what I believe is a major problem with this checkin of 
licensecheck.

https://anonscm.debian.org/cgit/collab-maint/devscripts.git/commit/?id=1d1dc56a50c056b95b04b9d5fa1f1a4d0a3fd6f2

software-license.t (which I sent you earlier for a different reason) 
works both before and after this change.
software-license2.t only works before.

license-reconcile currently heavily relies on the style in the second 
file (though apparently its tests do not pick that up.) I have been 
working on improving its test scripts as prelude to working through the 
bug and TODO list. I recently added a test that was the basis for these 
files and it was only then when I tested what is in the 
license-reconcile repository with what is in the devscripts repository 
that I found the issue.

As you can see the difference is that the second script makes use of the 
--recursive argument to licenscheck.

One possible solution would be for license-reconcile to make its own 
decisions over which files to use licensecheck on. This would not be 
difficult really but it would prevent me from improving the 
license-reconcile code in a systematic manner. I would rather suggest 
that you should offer both approaches as options via a command line 
option. I have no problem personally with which one you make the default.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: software-license.t
Type: application/x-perl
Size: 971 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20151126/9b31f358/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: software-license2.t
Type: application/x-perl
Size: 986 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20151126/9b31f358/attachment-0001.bin>


More information about the devscripts-devel mailing list