[libconfig-model-dpkg-perl] 02/03: copyright: convert File section into Files (Closes: #721672)

dod at debian.org dod at debian.org
Sat Sep 7 16:27:49 UTC 2013


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 00c92946a76494d02a83bc3f1397ae5e0542d719
Author: Dominique Dumont <dod at debian.org>
Date:   Sat Sep 7 18:27:22 2013 +0200

    copyright: convert File section into Files (Closes: #721672)
---
 lib/Config/Model/Backend/Dpkg/Copyright.pm |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/Config/Model/Backend/Dpkg/Copyright.pm b/lib/Config/Model/Backend/Dpkg/Copyright.pm
index 2ac4e91..c550f6a 100644
--- a/lib/Config/Model/Backend/Dpkg/Copyright.pm
+++ b/lib/Config/Model/Backend/Dpkg/Copyright.pm
@@ -69,6 +69,14 @@ sub read {
         my %section = map { (lc($_),$h{$_}) ; } keys %h ;
         $logger->debug("section nb $section_nb has fields: ".join(' ',keys %section)) ;
 
+        # Some people use 'File' to declare copyright info for a sinble file.
+        # While this is correct grammatically, it tends to be PITA
+        if (my $file_section = delete $section{file}) {
+            $logger->warn("Found File section. This one is converted in Files section (mind the plural)");
+            $file_section->[2] = 'changed file section into files section' ;
+            $section{files} //= $file_section ; # no clobber of good section
+        }
+
         if ( defined $section{copyright} and not defined $section{files}
              and not defined $file_paragraph{'*'} 
             ) {

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