[libconfig-model-dpkg-perl] 03/19: Set © to "UNKNOWN" to avoid fatal errors during update

dod at debian.org dod at debian.org
Sun Jan 3 11:44:18 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 f5fb981f532b024f2d5e148c32837f9f3bca6816
Author: Dominique Dumont <dod at debian.org>
Date:   Fri Dec 25 10:17:39 2015 +0100

    Set © to "UNKNOWN" to avoid fatal errors during update
---
 lib/Config/Model/Dpkg/Copyright.pm | 3 +++
 lib/Dpkg/Copyright/Scanner.pm      | 1 +
 2 files changed, 4 insertions(+)

diff --git a/lib/Config/Model/Dpkg/Copyright.pm b/lib/Config/Model/Dpkg/Copyright.pm
index ac80536..e33374b 100644
--- a/lib/Config/Model/Dpkg/Copyright.pm
+++ b/lib/Config/Model/Dpkg/Copyright.pm
@@ -79,6 +79,9 @@ sub update ($self, %args) {
         $new_data->{Copyright} = $c if ($c !~ /no-info-found|UNKNOWN/ or not $old_cop);
         $new_data->{License}{short_name} = $l if ($l ne 'UNKNOWN' or not $old_lic);
 
+        # when all fails
+        $new_data->{Copyright} ||= 'UNKNOWN';
+
         # create an inventory of different file copyright and license data
         my $dumper = Data::Dumper->new([$new_data])->Sortkeys(1)->Indent(0);
         my $datum_dump = $dumper->Dump;
diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index 1306cd2..377eb92 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -68,6 +68,7 @@ sub print_copyright ( %args ) {
         # don't print directory info covered by same info in directory above
         next if $paths[0] =~ /\.$/;
 
+        $c = "UNKNOWN" unless $c;
         push @out,
             "Files: ", join($whitespace_list_delimiter, @paths )."\n",
             "Copyright: $c\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