aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/openvswitch/APKBUILD6
-rw-r--r--community/openvswitch/ovsdb-idlc.in-fix-dict-change-during-iteration.patch38
2 files changed, 42 insertions, 2 deletions
diff --git a/community/openvswitch/APKBUILD b/community/openvswitch/APKBUILD
index 4c4fc0b2ee..7e9a799c56 100644
--- a/community/openvswitch/APKBUILD
+++ b/community/openvswitch/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=openvswitch
pkgver=2.12.0
-pkgrel=1
+pkgrel=2
pkgdesc="A production quality, multilayer virtual switch"
url="http://openvswitch.org/"
arch="all"
@@ -26,6 +26,7 @@ source="http://openvswitch.org/releases/openvswitch-$pkgver.tar.gz
ovs-modules.initd
ifupdown-alpine.patch
readme.debian.patch
+ ovsdb-idlc.in-fix-dict-change-during-iteration.patch
"
@@ -143,4 +144,5 @@ b1588d076bbfc7ef2dd46fce8e46186f40cbbc4667697f7ac13ddc68e34568fdab315fde47838de7
346aea099f51707d2b4fc9fdc8c1502582723fb4e00c4d5d1624b0378c94dfb76674fa95e2af894f36169df52109dbe441ee6a45aa744584d9e4c74d15a46c1d ovs-vswitchd.confd
1e08aa5ac6ce55b97256478b9243c8a4c92a42a97fc70ea0439c832b12a775af28a127224ae6c4ce01642dde65f76c610a44105912338bf443d8ea390c2d9ccf ovs-modules.initd
eca5b19954e6df7dc17c582e22e4b27533710d077039a54a2ba291ae7d3a2706872f5bcad8795ca58e06ca7e45a9b8c4c51e99aedbabd0e87623972ebcdca230 ifupdown-alpine.patch
-177f8c98cfa261b440c398d3a3be4aeba694ee3d43400082427cd3b238de9c84736193a25968a6029f4a09957d00c6fcfb3f87f9317feb71732f31c91933fd29 readme.debian.patch"
+177f8c98cfa261b440c398d3a3be4aeba694ee3d43400082427cd3b238de9c84736193a25968a6029f4a09957d00c6fcfb3f87f9317feb71732f31c91933fd29 readme.debian.patch
+adea9745be1d4721a90f5802b94e5132e380efd9d046ded6b6e13a8d22093705a1f468e40bd6d26f9ef09900a0a9ac2b1e5e9783c807dda07762025c1fa46cfd ovsdb-idlc.in-fix-dict-change-during-iteration.patch"
diff --git a/community/openvswitch/ovsdb-idlc.in-fix-dict-change-during-iteration.patch b/community/openvswitch/ovsdb-idlc.in-fix-dict-change-during-iteration.patch
new file mode 100644
index 0000000000..f9cadd2d7d
--- /dev/null
+++ b/community/openvswitch/ovsdb-idlc.in-fix-dict-change-during-iteration.patch
@@ -0,0 +1,38 @@
+From d84109f0b60096ce71cd0537b31b69a7f5ea8756 Mon Sep 17 00:00:00 2001
+From: Flavio Leitner <fbl@sysclose.org>
+Date: Sat, 14 Sep 2019 20:17:28 -0300
+Subject: [PATCH] ovsdb-idlc.in: fix dict change during iteration.
+
+Python3 complains if a dict key is changed during the
+iteration.
+
+Use list() to create a copy of it.
+
+Traceback (most recent call last):
+ File "./ovsdb/ovsdb-idlc.in", line 1581, in <module>
+ func(*args[1:])
+ File "./ovsdb/ovsdb-idlc.in", line 185, in printCIDLHeader
+ replace_cplusplus_keyword(schema)
+ File "./ovsdb/ovsdb-idlc.in", line 179, in replace_cplusplus_keyword
+ for columnName in table.columns:
+RuntimeError: dictionary keys changed during iteration
+
+Signed-off-by: Flavio Leitner <fbl@sysclose.org>
+Signed-off-by: Ben Pfaff <blp@ovn.org>
+---
+ ovsdb/ovsdb-idlc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
+index 40fef39edf..22d0a4e22e 100755
+--- a/ovsdb/ovsdb-idlc.in
++++ b/ovsdb/ovsdb-idlc.in
+@@ -176,7 +176,7 @@ def replace_cplusplus_keyword(schema):
+ 'wchar_t', 'while', 'xor', 'xor_eq'}
+
+ for tableName, table in schema.tables.items():
+- for columnName in table.columns:
++ for columnName in list(table.columns):
+ if columnName in keywords:
+ table.columns[columnName + '_'] = table.columns.pop(columnName)
+