[perl-Sys-Virt/f15] Backport get_xml_description(flags)

Daniel P. Berrange berrange at fedoraproject.org
Thu May 19 10:23:16 UTC 2011


commit df5a210cb90ad3dd5440bdb18803e348c0c9871a
Author: Matthew Booth <mbooth at redhat.com>
Date:   Thu May 19 10:55:09 2011 +0100

    Backport get_xml_description(flags)

 Sys-Virt-0.2.6-get_xml_description-flags.patch |  140 ++++++++++++++++++++++++
 perl-Sys-Virt.spec                             |    7 +-
 2 files changed, 146 insertions(+), 1 deletions(-)
---
diff --git a/Sys-Virt-0.2.6-get_xml_description-flags.patch b/Sys-Virt-0.2.6-get_xml_description-flags.patch
new file mode 100644
index 0000000..60dd0b7
--- /dev/null
+++ b/Sys-Virt-0.2.6-get_xml_description-flags.patch
@@ -0,0 +1,140 @@
+commit 1584802db490cd459c07040cc636fd6f1ec35804
+Author: Daniel P. Berrange <berrange at redhat.com>
+Date:   Wed May 18 15:20:26 2011 +0100
+
+    Honour the flags parameter in all XML getters
+    
+    * Virt.xs: Add flags parameter to all get_xml_description methods
+
+diff --git a/Virt.xs b/Virt.xs
+index 3e42bf2..129d2f3 100644
+--- a/Virt.xs
++++ b/Virt.xs
+@@ -2162,12 +2162,13 @@ get_os_type(dom)
+       RETVAL
+ 
+ SV *
+-get_xml_description(dom)
++get_xml_description(dom, flags=0)
+       virDomainPtr dom;
++      unsigned int flags;
+   PREINIT:
+       char *xml;
+     CODE:
+-      if (!(xml = virDomainGetXMLDesc(dom, 0))) {
++      if (!(xml = virDomainGetXMLDesc(dom, flags))) {
+ 	 _croak_error(virConnGetLastError(virDomainGetConnect(dom)));
+       }
+       RETVAL = newSVpv(xml, 0);
+@@ -2738,12 +2739,13 @@ get_bridge_name(net)
+       RETVAL
+ 
+ SV *
+-get_xml_description(net)
++get_xml_description(net, flags=0)
+       virNetworkPtr net;
++      unsigned int flags;
+   PREINIT:
+       char *xml;
+     CODE:
+-      if (!(xml = virNetworkGetXMLDesc(net, 0))) {
++      if (!(xml = virNetworkGetXMLDesc(net, flags))) {
+ 	 _croak_error(virConnGetLastError(virNetworkGetConnect(net)));
+       }
+       RETVAL = newSVpv(xml, 0);
+@@ -2945,12 +2947,13 @@ is_persistent(pool)
+ 
+ 
+ SV *
+-get_xml_description(pool)
++get_xml_description(pool, flags=0)
+       virStoragePoolPtr pool;
++      unsigned int flags;
+   PREINIT:
+       char *xml;
+     CODE:
+-      if (!(xml = virStoragePoolGetXMLDesc(pool, 0))) {
++      if (!(xml = virStoragePoolGetXMLDesc(pool, flags))) {
+ 	 _croak_error(virConnGetLastError(virStoragePoolGetConnect(pool)));
+       }
+       RETVAL = newSVpv(xml, 0);
+@@ -3192,12 +3195,13 @@ get_path(vol)
+ 
+ 
+ SV *
+-get_xml_description(vol)
++get_xml_description(vol, flags=0)
+       virStorageVolPtr vol;
++      unsigned int flags;
+   PREINIT:
+       char *xml;
+     CODE:
+-      if (!(xml = virStorageVolGetXMLDesc(vol, 0))) {
++      if (!(xml = virStorageVolGetXMLDesc(vol, flags))) {
+ 	 _croak_error(virConnGetLastError(virStorageVolGetConnect(vol)));
+       }
+       RETVAL = newSVpv(xml, 0);
+@@ -3302,12 +3306,13 @@ get_parent(dev)
+ 
+ 
+ SV *
+-get_xml_description(dev)
++get_xml_description(dev, flags=0)
+       virNodeDevicePtr dev;
++      unsigned int flags;
+   PREINIT:
+       char *xml;
+     CODE:
+-      if (!(xml = virNodeDeviceGetXMLDesc(dev, 0))) {
++      if (!(xml = virNodeDeviceGetXMLDesc(dev, flags))) {
+ 	_croak_error(virGetLastError());
+       }
+       RETVAL = newSVpv(xml, 0);
+@@ -3457,12 +3462,13 @@ is_active(iface)
+ 
+ 
+ SV *
+-get_xml_description(iface)
++get_xml_description(iface, flags=0)
+       virInterfacePtr iface;
++      unsigned int flags;
+   PREINIT:
+       char *xml;
+     CODE:
+-      if (!(xml = virInterfaceGetXMLDesc(iface, 0))) {
++      if (!(xml = virInterfaceGetXMLDesc(iface, flags))) {
+ 	 _croak_error(virConnGetLastError(virInterfaceGetConnect(iface)));
+       }
+       RETVAL = newSVpv(xml, 0);
+@@ -3610,12 +3616,13 @@ get_usage_type(sec)
+ 
+ 
+ SV *
+-get_xml_description(sec)
++get_xml_description(sec, flags=0)
+       virSecretPtr sec;
++      unsigned int flags;
+   PREINIT:
+       char *xml;
+     CODE:
+-      if (!(xml = virSecretGetXMLDesc(sec, 0))) {
++      if (!(xml = virSecretGetXMLDesc(sec, flags))) {
+ 	 _croak_error(virConnGetLastError(virSecretGetConnect(sec)));
+       }
+       RETVAL = newSVpv(xml, 0);
+@@ -3761,12 +3768,13 @@ get_name(filter)
+ 
+ 
+ SV *
+-get_xml_description(filter)
++get_xml_description(filter, flags=0)
+       virNWFilterPtr filter;
++      unsigned int flags;
+   PREINIT:
+       char *xml;
+     CODE:
+-      if (!(xml = virNWFilterGetXMLDesc(filter, 0))) {
++      if (!(xml = virNWFilterGetXMLDesc(filter, flags))) {
+ 	_croak_error(virGetLastError());
+       }
+       RETVAL = newSVpv(xml, 0);
diff --git a/perl-Sys-Virt.spec b/perl-Sys-Virt.spec
index 75fc734..f8e80fe 100644
--- a/perl-Sys-Virt.spec
+++ b/perl-Sys-Virt.spec
@@ -1,12 +1,13 @@
 Name:           perl-Sys-Virt
 Version:        0.2.6
-Release:        2%{?dist}
+Release:        3%{?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
+Patch2:         Sys-Virt-%{version}-get_xml_description-flags.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  perl(ExtUtils::MakeMaker)
 BuildRequires:  perl(Test::Pod)
@@ -23,6 +24,7 @@ virtualization containers to be managed with a consistent API.
 %prep
 %setup -q -n Sys-Virt-%{version}
 %patch1 -p1
+%patch2 -p1
 
 sed -i -e '/Sys-Virt\.spec/d' Makefile.PL
 sed -i -e '/\.spec\.PL$/d' MANIFEST
@@ -57,6 +59,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/*
 
 %changelog
+* Thu May 19 2011 Matthew Booth <mbooth at redhat.com> - 0.2.6-3
+- Backport get_xml_description with flags
+
 * Wed Feb 16 2011 Daniel P Berrange <berrange at berrange.com> - 0.2.6-2
 - Workaround Test::More's inability to cast XML::XPath::Number to an int
 


More information about the scm-commits mailing list