[libconfig-model-dpkg-perl] 05/19: Raise a warning if copyright or license contains 'unknown'

dod at debian.org dod at debian.org
Sun Jan 3 11:44:19 UTC 2016


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 12b174a0fcac50970ad19c20482716d9389968b3
Author: Dominique Dumont <dod at debian.org>
Date:   Sat Dec 26 17:50:37 2015 +0100

    Raise a warning if copyright or license contains 'unknown'
---
 lib/Config/Model/models/Dpkg/Copyright/Content.pl     | 7 ++++++-
 lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl | 3 +++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/Config/Model/models/Dpkg/Copyright/Content.pl b/lib/Config/Model/models/Dpkg/Copyright/Content.pl
index ec00055..5e2f34d 100644
--- a/lib/Config/Model/models/Dpkg/Copyright/Content.pl
+++ b/lib/Config/Model/models/Dpkg/Copyright/Content.pl
@@ -33,7 +33,12 @@ the Copyright field for a stanza covering both file A and file B need contain on
 The Copyright field may contain the original copyright statement copied exactly (including the word Copyright), or it can shorten the text, as long as it does not sacrifice information. Examples in this specification use both forms.',
         'mandatory' => '1',
         'type' => 'leaf',
-        'value_type' => 'string'
+        'value_type' => 'string',
+        'warn_if_match' => {
+          'UNKNOWN' => {
+            'msg' => 'Unknown copyright owner: please add correct value or remove the File entry.'
+          }
+        }
       },
       'License',
       {
diff --git a/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl b/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl
index 70b08b4..d470cad 100644
--- a/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl
+++ b/lib/Config/Model/models/Dpkg/Copyright/FileLicense.pl
@@ -104,6 +104,9 @@ $lic->move($old,$_) unless $text or $lic->defined($_);
 ',
             'msg' => 'Please use BSD-x-clause name, like BSD-3-clause'
           },
+          'UNKNOWN' => {
+            'msg' => 'Unknown license: please add correct value or remove the File entry.'
+          },
           '\\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