[libconfig-model-dpkg-perl] 04/05: copyright backend: append second occurrence of a string entry (Closes: #721670)

dod at debian.org dod at debian.org
Sat Sep 7 15:34: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 7b5225cd7abf5c6a8ea69d747989057d0d94cc2a
Author: Dominique Dumont <dod at debian.org>
Date:   Sat Sep 7 17:33:47 2013 +0200

    copyright backend: append second occurrence of a string entry (Closes: #721670)
---
 lib/Config/Model/Backend/Dpkg/Copyright.pm |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/Config/Model/Backend/Dpkg/Copyright.pm b/lib/Config/Model/Backend/Dpkg/Copyright.pm
index 2e29da3..c767186 100644
--- a/lib/Config/Model/Backend/Dpkg/Copyright.pm
+++ b/lib/Config/Model/Backend/Dpkg/Copyright.pm
@@ -235,7 +235,14 @@ sub _store_text_no_synopsis {
     my ($object,$v,$check) = @_ ;
     #$v =~ s/^\s*\n// ;
     chomp $v ;
-    $logger->debug("_store_text_no_synopsis with check $check on ".$object->name." = '$v'");
+    my $old = $object->fetch(check => 'no');
+    if ($old) {
+        $logger->warn("double entry for ",$object->name,", appending value");
+        $v = $old."\n".$v;
+    }
+    $logger->debug("_store_text_no_synopsis with check $check on ".$object->name." = '$v'")
+        if $logger->is_debug;
+
     $object->store(value => $v, check => $check) ; 
 }
 

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