[libsoftware-license-perl] 03/09: improved patch
dod at debian.org
dod at debian.org
Tue Sep 23 11:57:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to branch master
in repository libsoftware-license-perl.
commit 30c0ffb70633898b017ae0d6f0b8e0cd89b043ac
Author: Dominique Dumont <dod at debian.org>
Date: Sat Sep 20 10:17:07 2014 +0200
improved patch
---
debian/patches/short-name-fallback | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/debian/patches/short-name-fallback b/debian/patches/short-name-fallback
index 705e43f..817cfcf 100644
--- a/debian/patches/short-name-fallback
+++ b/debian/patches/short-name-fallback
@@ -1,11 +1,26 @@
--- a/lib/Software/LicenseUtils.pm
+++ b/lib/Software/LicenseUtils.pm
-@@ -214,7 +214,7 @@
- Carp::croak "Unknow license with short name $short"
- unless $short_name{$short};
+@@ -211,14 +211,13 @@
+ Carp::croak "no license short name specified"
+ unless defined $arg->{short_name};
+ my $short = delete $arg->{short_name};
+- Carp::croak "Unknow license with short name $short"
+- unless $short_name{$short};
- my $info = $short_name{$short} ;
+ my $info = $short_name{$short} || "Software::License::$short";
my @infos = ref $info ? @$info : ($info);
my $lic_file = my $lic_class = shift @infos;
$lic_file =~ s!::!/!g;
+- require "$lic_file.pm";
++ eval { require "$lic_file.pm"; } ;
++ Carp::croak "Unknow license with short name $short ($@)" if $@;
+ return $lic_class->new( { %$arg, @infos } );
+ }
+
+@@ -288,4 +287,4 @@
+ This is free software; you can redistribute it and/or modify it under
+ the same terms as the Perl 5 programming language system itself.
+
+-=cut
++=CUT
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libsoftware-license-perl.git
More information about the Pkg-perl-cvs-commits
mailing list