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 52d91aa4a527e60765594eb2b9e111012933aa78
Author: Dominique Dumont <d...@debian.org>
Date:   Wed Mar 26 12:21:22 2014 +0100

    Dpkg::Copyright: check consistency of global License parameter
---
 .../Model/models/Dpkg/Copyright/GlobalLicense.pl       | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/lib/Config/Model/models/Dpkg/Copyright/GlobalLicense.pl 
b/lib/Config/Model/models/Dpkg/Copyright/GlobalLicense.pl
index 24fa476..37defad 100644
--- a/lib/Config/Model/models/Dpkg/Copyright/GlobalLicense.pl
+++ b/lib/Config/Model/models/Dpkg/Copyright/GlobalLicense.pl
@@ -3,6 +3,7 @@
     'author' => [
       'Dominique Dumont'
     ],
+    'class_description' => 'Represents a license that can be applied to the 
whole package. This element can be omitted.',
     'copyright' => [
       '2010',
       '2011 Dominique Dumont'
@@ -11,6 +12,23 @@
       'short_name',
       {
         'description' => 'The Copyright and License fields in the header 
paragraph may complement but do not replace the files paragraphs. They can be 
used to summarise the contributions and redistribution terms for the whole 
package, for instance when a work combines a permissive and a copyleft license, 
or to document a compilation copyright and license. It is possible to use only 
License in the header paragraph, but Copyright alone makes no sense.',
+        'grammar' => 'check:<rulevar: local $ok = 1 >
+check: license(?) alternate(s?) <reject: $text or not $ok >
+alternate: comma(?) oper license
+comma: \',\'
+oper: \'and\' | \'or\'
+license: /[^\\s,]+/i
+   { # PRD action to check if the license text is provided
+     my $abbrev = $item[1] ;
+     my $elt = $arg[0]->grab(step => "!Dpkg::Copyright License", mode => 
\'strict\', type => \'hash\') ;
+     if ($elt->defined($abbrev) or $arg[0]->grab("- full_license")->fetch) {
+        $ok &&= 1;
+     }
+     else {
+        $ok = 0 ;
+        ${$arg[1]} .= "license $abbrev is not declared in main License 
section. Expected ".join(" ",$elt->fetch_all_indexes) ;
+     }
+   } ',
         'help' => {
           'Apache' => 'Apache license. For versions, consult the 
Apache_Software_Foundation.',
           'Artistic' => 'Artistic license. For versions, consult the 
Perl_Foundation',

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

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to