On Thursday, 11 May 2017 21:44:50 CEST you wrote:
> Because I like the promises of cme, I decided to try and use it again on a
> new package I am working on.
Thanks for your effort. I'll do my best to keep that promise :-)
> I bisected this, and it turns out that I can reproduce this with two files
> present (which indivially are fine) but when both present, it goes wrong.
Many thanks for boiling that down.
> I believe the problem is that licensecheck didn't find year for the
copyright, and a common copyright-holder for the two files.
Yes. the regexp to extract years from © was fooled by the weird entry from the
JS files.
Could you try the attached patch ?
All the best
--
https://github.com/dod38fr/ -o- http://search.cpan.org/~ddumont/
http://ddumont.wordpress.com/ -o- irc: dod at irc.debian.org
commit c40290fd82335a6d9d44765472d58152a2378791
Author: Dominique Dumont <d...@debian.org>
Date: Sat May 13 09:44:22 2017 +0200
improve split copyright (Closes: #862368)
require that copyright years begins with at least 2 numbers
diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index ba448936..acf2baea 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -340,7 +340,7 @@ sub scan_files ( %args ) {
}
sub __split_copyright ($c) {
- my ($years,$owner) = $c =~ /([\s,\d-]+)(.*)/;
+ my ($years,$owner) = $c =~ /^(\d\d[\s,\d-]+)(.*)/;
# say "undef year in $c" unless defined $years;
return unless defined $years;
my @data = split /(?<=\d)[,\s]+/, $years;