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 261c32f5581bfbbde2dd57edcb19f716f1851c70
Author: Dominique Dumont <d...@debian.org>
Date:   Tue Feb 23 21:43:21 2016 +0100

    scanner: skip LICENSE or README without info...
---
 lib/Dpkg/Copyright/Scanner.pm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index 2477030..102a2d5 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -486,7 +486,7 @@ sub __coalesce_copyright_years($entries, $owners) {
 
 # $h is a tree of hash matching the directory structure. Each leaf is a
 # copyright id. Each key is a file name in a directory (not the full path)
-sub __squash ($h) {
+sub __squash ($h, $p = '') {
     my %count ;
 
     # find main license info found in LICENCE or COPYING or README
@@ -496,8 +496,9 @@ sub __squash ($h) {
         foreach my $name (sort keys %$h) {
             if ($name =~ $re) {
                 my $id = delete $h->{$name};
-                # say "del global lic info $name with $id";
-                # using 1 means that info from this file is easy to override
+                next unless $id; # skip files without info
+                # say "del global lic info $p/$name with $id";
+                # using 1 means that info from this file is not easy to 
override
                 $count{$id} = 1;
             };
         }
@@ -510,7 +511,7 @@ sub __squash ($h) {
         if (ref($item)) {
             # squash may return a plain id, or a hash with '*' => id ,
             # or a non squashable hash
-            $h->{$name} = __squash($item);
+            $h->{$name} = __squash($item, $p.'/'.$name);
         }
         my $id = (ref($item) and defined $item->{'*'}) ? $item->{'*'} : $item ;
 

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