commit 987c36ca2e11f57ac95a4836ee8b0c24d981ea6c
Author: Petr Písař <ppi...@redhat.com>
Date:   Wed May 14 16:47:39 2014 +0200

    Fix test failures due randomized hash key order

 ...consistent-declarations-for-error-message.patch |   33 ++++++++++++++++++++
 perl-AutoClass.spec                                |    8 ++++-
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git 
a/autoclass-v1.01-Sort-inconsistent-declarations-for-error-message.patch 
b/autoclass-v1.01-Sort-inconsistent-declarations-for-error-message.patch
new file mode 100644
index 0000000..7ee306d
--- /dev/null
+++ b/autoclass-v1.01-Sort-inconsistent-declarations-for-error-message.patch
@@ -0,0 +1,33 @@
+From fcc5bac3264420de0203589753b732da1dbc27bb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
+Date: Wed, 14 May 2014 16:42:24 +0200
+Subject: [PATCH] Sort inconsistent declarations for error message
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Random hash key ordering casues test failures. It's also good to have
+stable output for human error messages.
+
+https://rt.cpan.org/Public/Bug/Display.html?id=95642
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ lib/Class/AutoClass.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Class/AutoClass.pm b/lib/Class/AutoClass.pm
+index 1d7337a..83fd07a 100644
+--- a/lib/Class/AutoClass.pm
++++ b/lib/Class/AutoClass.pm
+@@ -530,7 +530,7 @@ sub declare {
+  @cattributes_recursive{keys %cattributes}=values %cattributes;
+  push(@attributes_recursive,keys %iattributes,keys %cattributes);
+  # are all these declarations consistent?
+- if (my @inconsistents=grep {exists $cattributes_recursive{$_}} keys 
%iattributes_recursive) {
++ if (my @inconsistents=sort grep {exists $cattributes_recursive{$_}} keys 
%iattributes_recursive) {
+    # inconsistent class vs. instance declarations
+    my @errstr=("Inconsistent declarations for attribute(s) @inconsistents");
+    map {
+-- 
+1.9.0
+
diff --git a/perl-AutoClass.spec b/perl-AutoClass.spec
index 6bcaf2a..e7663f7 100644
--- a/perl-AutoClass.spec
+++ b/perl-AutoClass.spec
@@ -1,11 +1,13 @@
 Name:           perl-AutoClass
 Version:        1_01
-Release:        20%{?dist}
+Release:        21%{?dist}
 Summary:        Automatically define classes and objects for Perl
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/autoclass/
 Source0:        
http://www.cpan.org/modules/by-module/Class/autoclass_v%{version}.tgz
+# Fix test failures due randomized hash key order, bug #1058699, CPAN RT#95642
+Patch0:         
autoclass-v1.01-Sort-inconsistent-declarations-for-error-message.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  perl(IO::Scalar)
@@ -21,6 +23,7 @@ inheritance structure.
 
 %prep
 %setup -q -n AutoClass
+%patch0 -p1
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -49,6 +52,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/*
 
 %changelog
+* Wed May 14 2014 Petr Pisar <ppi...@redhat.com> - 1_01-21
+- Fix test failures due randomized hash key order (bug #1058699)
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-...@lists.fedoraproject.org> 
- 1_01-20
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

Reply via email to