[libconfig-model-dpkg-perl] 23/27: Scanner: scan_files now returns files with no-info-found...

dod at debian.org dod at debian.org
Mon Jan 12 07:09:50 UTC 2015


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 a9db23c2526c4106a73d7a5dd9e2c8a3102e871a
Author: Dominique Dumont <dod at debian.org>
Date:   Mon Jan 5 20:50:44 2015 +0100

    Scanner: scan_files now returns files with no-info-found...
    
    This can be filtered out by caller of scan_files
---
 lib/Dpkg/Copyright/Scanner.pm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index 5eaa709..8675a00 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -46,6 +46,7 @@ sub print_copyright {
 
     foreach my $data (@copyright_data) {
         my ($paths, $c, $l) = $data->@*;
+        next if $c eq 'no-info-found';
         say "Files: ", join($whitespace_list_delimiter, $paths->@* );
         say "Copyright: $c";
         say "License: $l";
@@ -68,10 +69,6 @@ sub scan_files {
         chomp $line;
         say "found: $line";
         my ($f,$l,$c) = split /\t/, $line; 
-        if ($c =~ /^\*No/) {
-            say "no info for $f, check manually this file";
-            next;
-        } ;
         $f =~ s!\./!!;
         $l =~ s/([*?\\])/\\$1/g;
         $l =~ s/\s*\(unversioned\/unknown version\)//;
@@ -90,6 +87,7 @@ sub scan_files {
         $c =~ s/(?<=\b\d{4})\s*-\s*\d{4}(?=\s*-\s*(\d{4})\b)//g;
         $c =~ s/(\d+)\s*-\s*(\d+)/$1-$2/g;
         $c =~ s/\b(\d{4}),?\s+([\S^\d])/$1, $2/g;
+        $c = 'no-info-found' if $c =~ /^\*No/;
 
         $c =  __pack_copyright($c);
 
@@ -134,6 +132,7 @@ sub scan_files {
 
 sub __pack_copyright ($r) {
 
+    return $r if $r eq 'no-info-found';
     my %cop;
     $r =~ /^\s+|\s+$/g;
     foreach my $c ( split( m!\s*/\s*!, $r)) {

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