commit 23361031cff1ce3dff8534243dcb3119d62d9f2e Author: Daniel P. Berrange <dan@xxxxxxxxxxxx> Date: Wed Feb 16 22:00:07 2011 +0000 Workaround Test::More's inability to cast XML::XPath::Number to an int Sys-Virt-0.2.6-xpath-cast.patch | 16 ++++++++++++++++ perl-Sys-Virt.spec | 7 ++++++- 2 files changed, 22 insertions(+), 1 deletions(-) --- diff --git a/Sys-Virt-0.2.6-xpath-cast.patch b/Sys-Virt-0.2.6-xpath-cast.patch new file mode 100644 index 0000000..9712d3b --- /dev/null +++ b/Sys-Virt-0.2.6-xpath-cast.patch @@ -0,0 +1,16 @@ +diff --git a/t/100-connect.t b/t/100-connect.t +index 3cf7634..98183b7 100644 +--- a/t/100-connect.t ++++ b/t/100-connect.t +@@ -46,9 +46,9 @@ my $guestword = $xp->find("string(/capabilities/guest[1]/arch/wordsize)"); + is($guestword, "32", "wordsize"); + my $guesttype = $xp->find("string(/capabilities/guest[1]/arch/domain/\@type)"); + is($guesttype, "test", "type"); +-my $guestpae = $xp->find("count(/capabilities/guest[1]/features/pae)"); ++my $guestpae = int($xp->find("count(/capabilities/guest[1]/features/pae)")); + is($guestpae, 1, "pae"); +-my $guestnonpae = $xp->find("count(/capabilities/guest[1]/features/nonpae)"); ++my $guestnonpae = int($xp->find("count(/capabilities/guest[1]/features/nonpae)")); + is($guestnonpae, 1, "nonpae"); + + my $ver = $conn->get_version(); diff --git a/perl-Sys-Virt.spec b/perl-Sys-Virt.spec index c7d4427..75fc734 100644 --- a/perl-Sys-Virt.spec +++ b/perl-Sys-Virt.spec @@ -1,11 +1,12 @@ Name: perl-Sys-Virt Version: 0.2.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Represent and manage a libvirt hypervisor connection License: GPLv2+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Sys-Virt/ Source0: http://www.cpan.org/authors/id/D/DA/DANBERR/Sys-Virt-%{version}.tar.gz +Patch1: Sys-Virt-%{version}-xpath-cast.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::Pod) @@ -21,6 +22,7 @@ virtualization containers to be managed with a consistent API. %prep %setup -q -n Sys-Virt-%{version} +%patch1 -p1 sed -i -e '/Sys-Virt\.spec/d' Makefile.PL sed -i -e '/\.spec\.PL$/d' MANIFEST @@ -55,6 +57,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/* %changelog +* Wed Feb 16 2011 Daniel P Berrange <berrange@xxxxxxxxxxxx> - 0.2.6-2 +- Workaround Test::More's inability to cast XML::XPath::Number to an int + * Wed Feb 16 2011 Daniel P Berrange <dan@xxxxxxxxxxxx> - 0.2.6-1 - Update to 0.2.6 release -- 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