openvswitch: backport patch to fix compilation
authorJosef Schlehofer <pepe.schlehofer@gmail.com>
Fri, 25 Oct 2019 01:02:50 +0000 (03:02 +0200)
committerYousong Zhou <yszhou4tech@gmail.com>
Fri, 25 Oct 2019 03:15:50 +0000 (11:15 +0800)
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
net/openvswitch/Makefile
net/openvswitch/patches/0005-ovsdb-idlc-fix-dict-change-during-iteration.patch [new file with mode: 0644]

index 819e0a34d62a4a1ff0e682ffedd9d415d977c2a0..d50425702343ea745968f291bf4d840619359352 100644 (file)
@@ -16,7 +16,7 @@ include $(INCLUDE_DIR)/kernel.mk
 #
 PKG_NAME:=openvswitch
 PKG_VERSION:=2.12.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.openvswitch.org/releases/
 PKG_HASH:=13fd42703180b4b1146c7e97926d09225485868cc2fbbd58dc0c421b4b8fe8f8
diff --git a/net/openvswitch/patches/0005-ovsdb-idlc-fix-dict-change-during-iteration.patch b/net/openvswitch/patches/0005-ovsdb-idlc-fix-dict-change-during-iteration.patch
new file mode 100644 (file)
index 0000000..f9cadd2
--- /dev/null
@@ -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)