[Build-common-hackers] Bug#625442: Bug#625442: cdbs: licensecheck -i (ignore) option overrides default

Olivier Aubert olivier.aubert at liris.cnrs.fr
Tue May 3 14:15:04 UTC 2011


I am pretty sure about the analysis, reading the licensecheck sourcecode
is clear:

# Initialize $opt_ignore_regexp with $default_ignore_regex only if no -i option was specified
$opt_ignore_regex = $default_ignore_regex if ! length $opt_ignore_regex;
# Ignore files matching $opt_ignore_regex
push @files, $_ unless m%$opt_ignore_regex%;

However, the described behaviour does not happen when invoked by CDBS. I
saw it happen since I had to copy/paste the command line to run it
(because of #625448):

licensecheck -c '.*' -r --copyright -i '^debian/(changelog|copyright(|_hints|_newhints))' -l '99999' * | /usr/lib/cdbs/licensecheck2dep5 

I do not quite know why it does not happen when invoked through CDBS (it is run from the same directory).


On Tue, 2011-05-03 at 13:55 +0200, Jonas Smedegaard wrote:
> Hi Olivier,
> On 11-05-03 at 12:31pm, Olivier Aubert wrote:
> > When activating the licensecheck reporting, licensecheck is invoked 
> > with the following option:
> > 
> >  -i '^debian/(changelog|copyright(|_hints|_newhints))'
> > 
> > Setting this option overrides the default value 
> > ('(?:^|/).*~$|(?:^|/)\.#.*$|(?:^|/)\..*\.swp$|(?:^|/),,.*(?:$|/.*$)|(?:^|/)(?:DEADJOE|\.cvsignore|\.arch-inventory|\.bzrignore|\.gitignore)$|(?:^|/)(?:CVS|RCS|\.deps|\{arch\}|\.arch-ids|\.svn|\.hg|_darcs|\.git|\.shelf|_MTN|\.bzr(?:\.backup|tags)?)(?:$|/.*$)') 
> > so activating the rule in a git-maintained tree will try to parse the 
> > whole .git repository.
> Really?
> I haven't experienced that issues myself - and use Git on most packages 
> I am involved in maintaining.
> Could you please provide an example package, with complete command and 
> the resulting copyright_hints file containing ugly git blobs.
> > This could be fixed either in the licensecheck2dep5 (by filtering the 
> > changelog/copyright* files here), or by filing a bug report against 
> > licensecheck so that there is another option to append an additional 
> > ignore regexp in addition to the default one.
> If truly dot-folders are included too then yes, there are several 
> approaches to improving that situation.  But please first double-check 
> that this in fact is the case.
> Regards,
>  - Jonas

More information about the Build-common-hackers mailing list