[perl-Archive-RPM] Restore compatibility with Moose > 2.1005
Petr Pisar
ppisar at fedoraproject.org
Thu Dec 4 14:48:00 UTC 2014
commit 57da78e3791ed54bc86566f8294b7be765240043
Author: Petr Písař <ppisar at redhat.com>
Date: Thu Dec 4 15:00:45 2014 +0100
Restore compatibility with Moose > 2.1005
...ct-RPM2-Headers-into-INC-for-Moose-2.1005.patch | 38 ++++++++++++++++++++
perl-Archive-RPM.spec | 8 ++++-
2 files changed, 45 insertions(+), 1 deletions(-)
---
diff --git a/Archive-RPM-0.07-Inject-RPM2-Headers-into-INC-for-Moose-2.1005.patch b/Archive-RPM-0.07-Inject-RPM2-Headers-into-INC-for-Moose-2.1005.patch
new file mode 100644
index 0000000..c0e545e
--- /dev/null
+++ b/Archive-RPM-0.07-Inject-RPM2-Headers-into-INC-for-Moose-2.1005.patch
@@ -0,0 +1,38 @@
+From b70bfb107ea444b0e574e46757c409b4344620e3 Mon Sep 17 00:00:00 2001
+From: Paul Howarth <paul at city-fan.org>
+Date: Thu, 4 Dec 2014 14:51:00 +0100
+Subject: [PATCH] Inject RPM2::Headers into %INC for Moose > 2.1005
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Moose > 2.1005 inspects %INC for loaded classes which is not true for
+RPM2::Headers which comes from RPM2.pm
+
+Fixes CPAN RT#100701. See Moose's CPAN RT#100702.
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ lib/Archive/RPM.pm | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/lib/Archive/RPM.pm b/lib/Archive/RPM.pm
+index c89c07c..913ce8c 100644
+--- a/lib/Archive/RPM.pm
++++ b/lib/Archive/RPM.pm
+@@ -32,6 +32,12 @@ use Archive::RPM::ChangeLogEntry;
+
+ our $VERSION = '0.07';
+
++# Moose 2.14 onwards looks for RPM2::Header in %INC but it's from RPM2.pm
++# (CPAN RT#100701)
++unless ( $INC{ "RPM2/Header.pm" } ) {
++ $INC{ "RPM2/Header.pm" } = $INC{ "RPM2.pm" };
++}
++
+ with 'MooseX::Traits';
+ has '+_trait_namespace' => (default => 'Archive::RPM::TraitFor');
+
+--
+1.9.3
+
diff --git a/perl-Archive-RPM.spec b/perl-Archive-RPM.spec
index c866efd..2b56a69 100644
--- a/perl-Archive-RPM.spec
+++ b/perl-Archive-RPM.spec
@@ -1,6 +1,6 @@
Name: perl-Archive-RPM
Version: 0.07
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Work with a RPM
# lib/Archive/RPM.pm -> LGPLv2+
# lib/Archive/RPM/ChangeLogEntry.pm -> LGPLv2+
@@ -8,6 +8,8 @@ License: LGPLv2+
Group: Development/Libraries
Url: http://search.cpan.org/dist/Archive-RPM
Source: http://search.cpan.org/CPAN/authors/id/R/RS/RSRCHBOY/Archive-RPM-%{version}.tar.gz
+# Restore compatibility with Moose > 2.1005, bug #1168859, CPAN RT#100701
+Patch0: Archive-RPM-0.07-Inject-RPM2-Headers-into-INC-for-Moose-2.1005.patch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch: noarch
# non-perl
@@ -41,6 +43,7 @@ information we can't get through RPM2.
%prep
%setup -q -n Archive-RPM-%{version}
+%patch0 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor
@@ -61,6 +64,9 @@ make test
%{_mandir}/man3/*.3*
%changelog
+* Thu Dec 04 2014 Petr Pisar <ppisar at redhat.com> - 0.07-9
+- Restore compatibility with Moose > 2.1005 (bug #1168859)
+
* Mon Sep 01 2014 Jitka Plesnikova <jplesnik at redhat.com> - 0.07-8
- Perl 5.20 rebuild
More information about the scm-commits
mailing list