[libconfig-model-dpkg-perl] 03/07: Dpkg::Copyright: fix automatic import of license summary or text

dod at debian.org dod at debian.org
Thu Sep 25 14:32:18 UTC 2014


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 91082d4f6a501af741c3546b9e026defb762026f
Author: Dominique Dumont <dod at debian.org>
Date:   Tue Sep 23 14:01:07 2014 +0200

    Dpkg::Copyright: fix automatic import of license summary or text
---
 .../Model/models/Dpkg/Copyright/LicenseSpec.pl       | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/Config/Model/models/Dpkg/Copyright/LicenseSpec.pl b/lib/Config/Model/models/Dpkg/Copyright/LicenseSpec.pl
index 8ad57a0..f33cce5 100644
--- a/lib/Config/Model/models/Dpkg/Copyright/LicenseSpec.pl
+++ b/lib/Config/Model/models/Dpkg/Copyright/LicenseSpec.pl
@@ -22,18 +22,18 @@
         'compute' => {
           'allow_override' => '1',
           'formula' => 'require Software::LicenseUtils ;
-my $h = { 
-  short_name => &index( - ), 
-  holder => \'foo\' 
-} ;
+my $lic = &index( - ) ;
+my $h = { short_name => $lic, holder => \'foo\' } ;
 
-# no need to fail if short_name is unknown
-eval {
-  Software::LicenseUtils->new_from_short_name($h)->debian_text ; 
-} ;
+if (defined $lic and $lic) {
+   # no need to fail if short_name is unknown
+   eval {
+       Software::LicenseUtils->new_from_short_name($h)->debian_text ;
+   } ;
 
-if ($@) {
-   print "Cannot find license text for ".$h->{short_name}."\\n" ;
+   if ($@) {
+       print "Cannot find license text for $lic\\n" ;
+   }
 }',
           '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



More information about the Pkg-perl-cvs-commits mailing list