From 86fcf57807dae9f4a149a7aca583f676cbbdc18d Mon Sep 17 00:00:00 2001 From: jasper Date: Wed, 2 Sep 2015 06:35:26 +0000 Subject: [PATCH] Fix the generator issue with a patch proposed to upstream, instead of reverting the offending commit --- sysutils/libvirt-python/Makefile | 3 +- .../libvirt-python/patches/patch-generator_py | 42 ++++--------------- 2 files changed, 10 insertions(+), 35 deletions(-) diff --git a/sysutils/libvirt-python/Makefile b/sysutils/libvirt-python/Makefile index 8163c49576c..2864c2ef2e2 100644 --- a/sysutils/libvirt-python/Makefile +++ b/sysutils/libvirt-python/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2015/08/12 06:53:53 jasper Exp $ +# $OpenBSD: Makefile,v 1.18 2015/09/02 06:35:26 jasper Exp $ SHARED_ONLY = Yes @@ -6,6 +6,7 @@ COMMENT = libvirt virtualization API python bindings MODPY_EGG_VERSION = 1.2.18 DISTNAME = libvirt-python-${MODPY_EGG_VERSION} +REVISION = 0 CATEGORIES = sysutils diff --git a/sysutils/libvirt-python/patches/patch-generator_py b/sysutils/libvirt-python/patches/patch-generator_py index e98be4adab8..cccfb201da8 100644 --- a/sysutils/libvirt-python/patches/patch-generator_py +++ b/sysutils/libvirt-python/patches/patch-generator_py @@ -1,41 +1,15 @@ -$OpenBSD: patch-generator_py,v 1.1 2015/07/14 23:30:27 jasper Exp $ +$OpenBSD: patch-generator_py,v 1.2 2015/09/02 06:35:26 jasper Exp $ -- revert: - From d3e2aff6a701480bf19bdfe748c1c6def2db0a50 Mon Sep 17 00:00:00 2001 - From: Jiri Denemark - Date: Fri, 5 Jun 2015 10:17:53 +0200 - Subject: [PATCH] Provide symbolic names for typed parameters +https://bugzilla.redhat.com/show_bug.cgi?id=1222795 - https://bugzilla.redhat.com/show_bug.cgi?id=1222795 - ---- generator.py.orig Thu Jul 2 07:32:19 2015 -+++ generator.py Fri Jul 10 21:16:15 2015 -@@ -10,7 +10,6 @@ enums = {} # { enumType: { enumConstant: enumValue } } - lxc_enums = {} # { enumType: { enumConstant: enumValue } } - qemu_enums = {} # { enumType: { enumConstant: enumValue } } - event_ids = [] --params = [] # [ (parameName, paramValue)... ] - - import os - import sys -@@ -135,9 +134,6 @@ class docParser(xml.sax.handler.ContentHandler): - lxc_enum(attrs['type'],attrs['name'],attrs['value']) +--- generator.py.orig Wed Sep 2 08:33:58 2015 ++++ generator.py Wed Sep 2 08:34:11 2015 +@@ -136,7 +136,7 @@ class docParser(xml.sax.handler.ContentHandler): elif attrs['file'] == "libvirt-qemu": qemu_enum(attrs['type'],attrs['name'],attrs['value']) -- elif tag == "macro": + elif tag == "macro": - if "string" in attrs: -- params.append((attrs['name'], attrs['string'])) ++ if "string" in attrs.keys(): + params.append((attrs['name'], attrs['string'])) def end(self, tag): - if debug: -@@ -1884,10 +1880,6 @@ def buildWrappers(module): - for name,value in items: - classes.write("%s = %s\n" % (name,value)) - classes.write("\n") -- -- classes.write("# typed parameter names\n") -- for name, value in params: -- classes.write("%s = \"%s\"\n" % (name, value)) - - classes.close() -