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 4459087e90b22819932a91f2ec5768111ef270a0
Author: Dominique Dumont <d...@debian.org>
Date:   Sat Feb 27 12:27:13 2016 +0100

    license can be overridden with fill.copyright.blank
---
 .../Model/models/Dpkg/Copyright/FillBlanks/Pattern.pl |  6 ++++++
 lib/Dpkg/Copyright/Scanner.pm                         | 19 ++++++++++++-------
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/lib/Config/Model/models/Dpkg/Copyright/FillBlanks/Pattern.pl 
b/lib/Config/Model/models/Dpkg/Copyright/FillBlanks/Pattern.pl
index a9851bc..612ae0a 100644
--- a/lib/Config/Model/models/Dpkg/Copyright/FillBlanks/Pattern.pl
+++ b/lib/Config/Model/models/Dpkg/Copyright/FillBlanks/Pattern.pl
@@ -18,6 +18,12 @@
         'type' => 'leaf',
         'value_type' => 'uniline'
       },
+      'override-license',
+      {
+        'description' => 'C<override-license> key is used to ignore the 
license information coming from the source and provide the correct information. 
Use this as last resort when extracted license is corrupted and fill a bug 
against libconfig-model-dpkg-perl to get this issue fixed. Note that a warning 
will be shown each time a license is overridden.',
+        'type' => 'leaf',
+        'value_type' => 'string'
+      },
       'skip',
       {
         'description' => 'skip the files like a file without any information.',
diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index 102a2d5..2bf6233 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -248,13 +248,17 @@ sub scan_files ( %args ) {
         if ( $c =~ /no-info-found/ and $fill_blank->{copyright} ) {
             $c = $fill_blank->{copyright};
         }
-        elsif ($fill_blank->{'override-copyright'}) {
+        if ($fill_blank->{'override-copyright'}) {
             _warn "Overriding path $f copyright info\n";
             $c = $fill_blank->{'override-copyright'};
         }
         if ( $l =~/unknown/i and $fill_blank->{license} ) {
             $l = $fill_blank->{license};
         }
+        if ($fill_blank->{'override-license'}) {
+            _warn "Overriding path $f license info\n";
+            $l = $fill_blank->{'override-license'};
+        }
 
         my @no_info_found;
         if ( $c =~ /no-info-found/ ) {
@@ -580,7 +584,7 @@ sub __load_fill_blank_data ($current_dir) {
 
                 foreach my $k (keys $fill_blanks{$path}->%*) {
                     die "Error in file $file: Unexpected key '$k' in path 
'$path'\n"
-                        unless $k 
=~/^(comment|skip|license|(override-)?copyright)$/;
+                        unless $k 
=~/^(comment|skip|(override-)?(license|copyright))$/;
                 }
             }
         }
@@ -713,11 +717,12 @@ C<license_check>.
 When C<skip> is true, the file is skipped like a file without any
 information.
 
-The C<override-copyright> key can be used to ignore the copyright
-information coming from the source and provide the correct
-information. Use this as last resort for instance when the encoding of
-the owner is not ascii or utf-8. Note that a warning will be shown
-each time a copyright is overridden.
+The C<override-copyright> and C<override-license> keys can be used to
+ignore the copyright information coming from the source and provide
+the correct information. Use this as last resort for instance when the
+encoding of the owner is not ascii or utf-8 or when the license data
+is corrupted. Note that a warning will be shown each time an override
+key is used.
 
 =head1 METHODS
 

-- 
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