From dee62b0e3a49c8b3a35b6c6183e6bb0aa83d3c7e7c9aa3896cec8ec21b165bee Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 12 Oct 2020 19:36:24 +0000 Subject: [PATCH] - fix constructor param name for virDomain{Checkpoint,Snapshot} 61341150-fix-constructor-param-name.patch boo#1177559 OBS-URL: https://build.opensuse.org/package/show/Virtualization/python-libvirt-python?expand=0&rev=82 --- 61341150-fix-constructor-param-name.patch | 24 +++++++++++++++++++++++ python-libvirt-python.changes | 7 +++++++ python-libvirt-python.spec | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 61341150-fix-constructor-param-name.patch diff --git a/61341150-fix-constructor-param-name.patch b/61341150-fix-constructor-param-name.patch new file mode 100644 index 0000000..6b265f2 --- /dev/null +++ b/61341150-fix-constructor-param-name.patch @@ -0,0 +1,24 @@ +commit 613411502d2cdf3541837710239409044a376b0a +Author: Daniel P. Berrangé +Date: Tue Oct 6 10:30:59 2020 +0100 + + fix constructor param name for virDomainSnapshot / virDomainCheckpoint + + Fixes 7f021c21d6a091ca33615852d6061e75b2500f3f + Resolves https://gitlab.com/libvirt/libvirt-python/-/issues/4 + + Signed-off-by: Daniel P. Berrangé + +Index: libvirt-python-6.8.0/generator.py +=================================================================== +--- libvirt-python-6.8.0.orig/generator.py ++++ libvirt-python-6.8.0/generator.py +@@ -1482,7 +1482,7 @@ def buildWrappers(module: str) -> None: + classes.write(" def __init__(self, conn, _obj=None):\n") + classes.write(" self._conn = conn\n") + elif classname in ["virDomainCheckpoint", "virDomainSnapshot"]: +- classes.write(" def __init__(self, net, _obj=None):\n") ++ classes.write(" def __init__(self, dom, _obj=None):\n") + classes.write(" self._dom = dom\n") + classes.write(" self._conn = dom.connect()\n") + elif classname in ["virNetworkPort"]: diff --git a/python-libvirt-python.changes b/python-libvirt-python.changes index 330c598..25d254b 100644 --- a/python-libvirt-python.changes +++ b/python-libvirt-python.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 12 19:34:25 UTC 2020 - James Fehlig + +- fix constructor param name for virDomain{Checkpoint,Snapshot} + 61341150-fix-constructor-param-name.patch + boo#1177559 + ------------------------------------------------------------------- Thu Oct 1 16:49:58 UTC 2020 - James Fehlig diff --git a/python-libvirt-python.spec b/python-libvirt-python.spec index a7ae8e7..94651ac 100644 --- a/python-libvirt-python.spec +++ b/python-libvirt-python.spec @@ -31,6 +31,7 @@ Group: Development/Languages/Python Source0: %{srcname}-%{version}.tar.gz Source1: %{srcname}-%{version}.tar.gz.asc Source2: python-libvirt-python.keyring +Patch0: 61341150-fix-constructor-param-name.patch BuildRequires: fdupes BuildRequires: libvirt-devel = %{version} BuildRequires: python-rpm-macros @@ -52,6 +53,7 @@ of recent versions of Linux (v2.6.20+). %prep %setup -q -n %{srcname}-%{version} +%patch0 -p1 # Unset execute bit for example scripts; it can introduce spurious # RPM dependencies, like /usr/bin/python which can pull in python2