[libconfig-model-dpkg-perl] 05/36: C::M::D::Copyright: warn and fix BSD3 license (Closes: #797322)

dod at debian.org dod at debian.org
Sat Oct 17 16:27:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.

commit 2af882426fbcb4629d51b926b43e06101fbef3bc
Author: Dominique Dumont <dod at debian.org>
Date:   Tue Sep 29 12:56:33 2015 +0200

    C::M::D::Copyright: warn and fix BSD3 license (Closes:  #797322)
---
 lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl b/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl
index 0217641..71e90d4 100644
--- a/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl
+++ b/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl
@@ -94,6 +94,15 @@ license: abbrev exception(?)
         'type' => 'leaf',
         'value_type' => 'uniline',
         'warn_if_match' => {
+          '(^|\\s)BSD-?[234](\\s|$)' => {
+            'fix' => '# need to test if target exists before moving element
+my $old = $_;
+s/BSD-?(\\d)/BSD-$1-clause/;
+my $lic = $self->grab(\'- - - License\');
+$lic->move($old,$_) unless $lic->defined($_);
+',
+            'msg' => 'Please use BSD-x-clause name, like BSD-3-clause'
+          },
           '\\bMIT\\b' => {
             'fix' => '# need to test if target exists before moving element
 my $lic = $self->grab(\'- - - License\');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git



More information about the Pkg-perl-cvs-commits mailing list