This is an automated email from the git hooks/post-receive script. gregoa pushed a commit to branch master in repository libdist-zilla-plugins-cjm-perl.
commit 952aa539b3e557a27da554a24ebea6ffce5d7b6a Author: gregor herrmann <gre...@debian.org> Date: Sat Nov 12 18:02:11 2016 +0100 Add patch from CPAN RT to work with different CPAN::Meta::Spec versions. Closes: #834730 --- debian/patches/meta-spec.patch | 74 ++++++++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 75 insertions(+) diff --git a/debian/patches/meta-spec.patch b/debian/patches/meta-spec.patch new file mode 100644 index 0000000..692eb1a --- /dev/null +++ b/debian/patches/meta-spec.patch @@ -0,0 +1,74 @@ +Description: adjust test to various versions of Meta::Spec +Origin: https://github.com/mla/dist-zilla-plugins-cjm/commits/master + f177df1 and 5db270d +Bug: https://rt.cpan.org/Public/Bug/Display.html?id=116902 +Bug-Debian: https://bugs.debian.org/834730 +Author: Maurice Aubrey <maurice.aub...@gmail.com> +Reviewed-by: gregor herrmann <gre...@debian.org> +Last-Update: 2016-11-12 + +--- a/t/recommendedprereqs.t ++++ b/t/recommendedprereqs.t +@@ -3,7 +3,8 @@ + + use strict; + use warnings; +-use Test::More 0.88 tests => 4; # done_testing ++use version; ++use Test::More 0.88; + + use Test::DZil qw(Builder simple_ini); + use Parse::CPAN::Meta; +@@ -22,21 +23,37 @@ + + my $meta = Parse::CPAN::Meta->load_file($tzil->tempdir->file('build/META.yml')); + +-is_deeply( +- $meta->{prereqs}{runtime}{recommends}, +- { 'Foo::Bar' => '1.00', +- 'Foo::Baz' => 0 }, +- 'runtime recommends' +-); +- +-is($meta->{prereqs}{runtime}{suggests}, undef, 'runtime suggests'); +- +-is($meta->{prereqs}{test}{recommends}, undef, 'test recommends'); ++my $ver = version->new($meta->{'meta-spec'}{version}); ++diag "CPAN::Meta::Spec = $ver"; + +-is_deeply( +- $meta->{prereqs}{test}{suggests}, +- { 'Test::Other' => 0 }, +- 'test suggests' +-); ++if ($ver >= version->new('2')) { # See CPAN::Meta::Spec ++ is_deeply( ++ $meta->{prereqs}{runtime}{recommends}, ++ { 'Foo::Bar' => '1.00', ++ 'Foo::Baz' => 0 }, ++ 'runtime recommends' ++ ); ++ ++ is($meta->{prereqs}{runtime}{suggests}, undef, 'runtime suggests'); ++ ++ is($meta->{prereqs}{test}{recommends}, undef, 'test recommends'); ++ ++ is_deeply( ++ $meta->{prereqs}{test}{suggests}, ++ { 'Test::Other' => 0 }, ++ 'test suggests' ++ ); ++} elsif ($ver >= version->new('1.4')) { ++ is_deeply( ++ $meta->{recommends}, ++ { ++ 'Foo::Bar' => '1.00', ++ 'Foo::Baz' => 0, ++ }, ++ 'runtime recommends' ++ ); ++} else { ++ plan skip_all => "Unexpected CPAN::Meta::Spec version '$ver'"; ++} + + done_testing; diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..ababb50 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +meta-spec.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-plugins-cjm-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits