[perl-Test-Aggregate] Do not touch Test::Builder internals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 0fd4f7174d73d1163d65a94bca92ae6adaeadf9f
Author: Petr Písař <ppisar@xxxxxxxxxx>
Date:   Mon Apr 14 16:22:04 2014 +0200

    Do not touch Test::Builder internals

 ....371-Don-t-grab-at-Test-Builder-hash-keys.patch |   38 ++++++++++++++++++++
 perl-Test-Aggregate.spec                           |    8 ++++-
 2 files changed, 45 insertions(+), 1 deletions(-)
---
diff --git a/Test-Aggregate-0.371-Don-t-grab-at-Test-Builder-hash-keys.patch b/Test-Aggregate-0.371-Don-t-grab-at-Test-Builder-hash-keys.patch
new file mode 100644
index 0000000..41ab6f2
--- /dev/null
+++ b/Test-Aggregate-0.371-Don-t-grab-at-Test-Builder-hash-keys.patch
@@ -0,0 +1,38 @@
+From a58e3c83d93dae030de7cbba025d69298b93fd64 Mon Sep 17 00:00:00 2001
+From: "Michael G. Schwern" <mschwern@xxxxxxxx>
+Date: Mon, 14 Apr 2014 16:17:37 +0200
+Subject: [PATCH] Don't grab at Test::Builder hash keys
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Test::Aggregate grabs at an internal Test::Builder hash key rather
+than going through an accessor.  $BUILDER->{Test_Results} can be
+gotten through $BUILDER->details.  Since you only want the current
+test number, $BUILDER->current_test is fine.
+
+Undocumented assumptions about Test::Builder will break in 2.0.
+
+<https://rt.cpan.org/Public/Bug/Display.html?id=64604>
+
+Signed-off-by: Petr Písař <ppisar@xxxxxxxxxx>
+---
+ lib/Test/Aggregate.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Test/Aggregate.pm b/lib/Test/Aggregate.pm
+index aeb3ea9..f4c1f6c 100644
+--- a/lib/Test/Aggregate.pm
++++ b/lib/Test/Aggregate.pm
+@@ -303,7 +303,7 @@ sub run {
+     # some tests may have been run in BEGIN blocks.  This is deprecated and
+     # now warns
+     my $tab = 'Test::Aggregate::Builder';
+-    $BUILDER->{$tab}{last_test} = @{ $BUILDER->{Test_Results} } || 0;
++    $BUILDER->{$tab}{last_test} = $BUILDER->current_test || 0;
+     $BUILDER->{$tab}{aggregate_program} = $self->{aggregate_program};
+ 
+     my $current_test = 0;
+-- 
+1.9.0
+
diff --git a/perl-Test-Aggregate.spec b/perl-Test-Aggregate.spec
index 9a2e4c8..58ce36c 100644
--- a/perl-Test-Aggregate.spec
+++ b/perl-Test-Aggregate.spec
@@ -1,12 +1,14 @@
 Name:       perl-Test-Aggregate
 Version:    0.371
-Release:    1%{?dist}
+Release:    2%{?dist}
 # lib/Test/Aggregate.pm -> GPL+ or Artistic
 # lib/Test/Aggregate/Builder.pm -> GPL+ or Artistic
 License:    GPL+ or Artistic
 Group:      Development/Libraries
 Summary:    Aggregate *.t tests to make them run faster
 Source:     http://search.cpan.org/CPAN/authors/id/R/RW/RWSTAUNER/Test-Aggregate-%{version}.tar.gz
+# Do not touch Test::Builder internals that will change in 2.0, CPAN RT#64604
+Patch0:     Test-Aggregate-0.371-Don-t-grab-at-Test-Builder-hash-keys.patch
 Url:        http://search.cpan.org/dist/Test-Aggregate
 BuildArch:  noarch
 
@@ -52,6 +54,7 @@ are expensive to load, this can dramatically speed up a test suite.
 
 %prep
 %setup -q -n Test-Aggregate-%{version}
+%patch0 -p1
 
 %build
 perl Build.PL installdirs=vendor
@@ -70,6 +73,9 @@ perl Build.PL installdirs=vendor
 %{_mandir}/man3/*.3*
 
 %changelog
+* Mon Apr 14 2014 Petr Pisar <ppisar@xxxxxxxxxx> - 0.371-2
+- Do not touch Test::Builder internals (CPAN RT#64604)
+
 * Mon Apr 14 2014 Petr Pisar <ppisar@xxxxxxxxxx> - 0.371-1
 - 0.371 bump
 
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux