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 551c4743ff19c20b1b62d4e5f459d0e7390b017f
Author: Dominique Dumont <d...@debian.org>
Date:   Sat Jan 2 19:40:08 2016 +0100

    scanner: add the possibility to override copyright
---
 lib/Dpkg/Copyright/Scanner.pm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index ed5d789..c37ec12 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -171,6 +171,10 @@ sub scan_files ( %args ) {
         if ( $c =~ /no-info-found/ and $fill_blank->{copyright} ) {
             $c = $fill_blank->{copyright};
         }
+        elsif ($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};
         }
@@ -481,7 +485,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 =~/^(skip|license|copyright)$/;
+                        unless $k =~/^(skip|license|(override-)?copyright)$/;
                 }
             }
         }
@@ -505,6 +509,8 @@ sub __get_fill_blank ($fbd,$file) {
 
 __END__
 
+=encoding utf8
+
 =head1 NAME
 
  Dpkg::Copyright::Scanner - Scan files to provide copyright data
@@ -558,6 +564,8 @@ match a path. E.g:
    license: LGPL-2
  src/sunstone/:
    license: Apache-2.0
+ src/garbled/:
+   'copyright-override': 2016 Marcel Mézigue
 
 Pattern are matched from the beginning a
 path. I.e. C<share/websockify/> pattern will match
@@ -570,6 +578,11 @@ 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.
 
 =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