[libconfig-model-dpkg-perl] 01/06: Scanner: reformat warn msg about missing info
dod at debian.org
dod at debian.org
Sun Feb 21 11:32:11 UTC 2016
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 50fea3555c7abd49340f483606c10ea18a0428e4
Author: Dominique Dumont <dod at debian.org>
Date: Sun Feb 21 11:41:29 2016 +0100
Scanner: reformat warn msg about missing info
---
lib/Dpkg/Copyright/Scanner.pm | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index 72f2cb9..48656c4 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -200,6 +200,7 @@ sub scan_files ( %args ) {
my %copyrights ;
my $files = {};
my $id = 1;
+ my @no_info_list;
foreach my $line (sort @lines) {
chomp $line;
@@ -264,15 +265,24 @@ sub scan_files ( %args ) {
if ( $l =~/unknown/i and $is_debian_package ) {
push @no_info_found, 'license';
}
- _warn "Path $f has no ".join(' or ', @no_info_found)." info. You may want to add a line in debian/fill.copyright.blanks.yml\n"
- if @no_info_found;
+
+ push @no_info_list , [$f , @no_info_found ] if @no_info_found;
my $has_info = @no_info_found < 2;
# say "Storing '$f' : '$c' '$l' has_info: $has_info id $id";
$files->{$f} = $copyrights{$c}{$l} //= ($has_info ? $id++ : 0);
}
- my @notused = grep { ! $fill_blank_data->{$_}{used} and $_; } sort keys %$fill_blank_data ;
+ if (@no_info_list) {
+ my $msg= "The following paths are missing information:\n";
+ map {my ($p, at i) = $_->@*;
+ $msg .= "- $p: missing ".join(' and ', @i)."\n";
+ } @no_info_list;
+ $msg .= "You may want to add a line in debian/fill.copyright.blanks.yml\n\n";
+ _warn $msg;
+ }
+
+ my @notused = grep { ! $fill_blank_data->{$_}{used} and $_; } sort keys %$fill_blank_data ;
if (@notused) {
_warn "Warning: the following entries from fill.copyright.blanks.yml were not used\n- '"
.join("'\n- '", at notused)."'\n";
--
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