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 7f7099cc8e019a8ceeab7fab4e4e9b0b1942a029
Author: Dominique Dumont <[email protected]>
Date:   Sat Mar 14 18:05:02 2015 +0100

    Copyright model: clean up text retrieved from Software::License...
    
    ... to avoid test failures. Tests fails because this text is cleaned
    up when saving/reading data in copyright file. Thus the read value
    is different from the default value from the precious run and test comparing
    default and saved values fails. This should also make the UI more 
consistent:
    license text will not be shown as modified when loading copyright in UI
---
 lib/Config/Model/models/Dpkg/Copyright/LicenseSpec.pl | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lib/Config/Model/models/Dpkg/Copyright/LicenseSpec.pl 
b/lib/Config/Model/models/Dpkg/Copyright/LicenseSpec.pl
index 21c10bb..556a944 100644
--- a/lib/Config/Model/models/Dpkg/Copyright/LicenseSpec.pl
+++ b/lib/Config/Model/models/Dpkg/Copyright/LicenseSpec.pl
@@ -21,9 +21,9 @@
       {
         'compute' => {
           'allow_override' => '1',
-          'formula' => 'require Software::LicenseUtils ;
+          'formula' => q|require Software::LicenseUtils ;
 my $lic = &index( - ) ;
-my $h = { short_name => $lic, holder => \'foo\' } ;
+my $h = { short_name => $lic, holder => 'foo' } ;
 my $text;
 
 if (defined $lic and $lic) {
@@ -31,15 +31,18 @@ if (defined $lic and $lic) {
    eval {
        $text = Software::LicenseUtils->new_from_short_name($h)->debian_text ;
    } ;
-
+   # need to cleanup text to mimic cleanup done when copyright data is read 
from file
+   chomp($text);
+   # work-around a bug in lgpl license text summary... my bad :-/
+   $text =~ s!^\\.!!mg;
 # FIXME: find a way to warn user if a license is unknown only when
-# text is not set by another mean...
+# text is not set by another mean... may loop bad if not careful
 #   if ($@ and ! $self->value_object->{data}) {
 #       print "Cannot find license text for $lic\\n" ;
 #   }
 }
 
-$text;',
+$text;|,
           'undef_is' => '\'\'',
           'use_eval' => '1'
         },

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to