]> code.ossystems Code Review - openembedded-core.git/commitdiff
gconf: use python3
authorJoe Slater <joe.slater@windriver.com>
Fri, 24 Jul 2020 22:34:15 +0000 (15:34 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jul 2020 09:37:53 +0000 (10:37 +0100)
Modify gsettings-schema-convert to use python3.  Also
add RDEPEND on python3-xml.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-gnome/gnome/gconf/python3.patch [new file with mode: 0644]
meta/recipes-gnome/gnome/gconf_3.2.6.bb

diff --git a/meta/recipes-gnome/gnome/gconf/python3.patch b/meta/recipes-gnome/gnome/gconf/python3.patch
new file mode 100644 (file)
index 0000000..7c022a2
--- /dev/null
@@ -0,0 +1,60 @@
+gconf: use python3
+
+Convert gsettings-schema-convert to use python3.
+
+Upstream-Status: Inappropriate [gconf is deprecated]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/gsettings/gsettings-schema-convert
++++ b/gsettings/gsettings-schema-convert
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # vim: set ts=4 sw=4 et: coding=UTF-8
+ #
+ # Copyright (c) 2010, Novell, Inc.
+@@ -603,7 +603,7 @@ class SimpleSchemaParser:
+             for line in lines:
+                 current_line_nb += 1
+                 self.parse_line(line)
+-        except GSettingsSchemaConvertException, e:
++        except GSettingsSchemaConvertException as e:
+             raise GSettingsSchemaConvertException('%s:%s: %s' % (os.path.basename(self.file), current_line_nb, e))
+         return self.root
+@@ -1095,7 +1095,7 @@ def main(args):
+             try:
+                 parser = GConfSchemaParser(argfile, options.gettext_domain, options.schema_id, options.keep_underscores)
+                 schema_root = parser.parse()
+-            except SyntaxError, e:
++            except SyntaxError as e:
+                 raise GSettingsSchemaConvertException('\'%s\' does not look like a valid gconf schema file: %s' % (argfile, e))
+         else:
+             # autodetect if file is XML or not
+@@ -1104,7 +1104,7 @@ def main(args):
+                 schema_root = parser.parse()
+                 if not options.simple and not options.xml:
+                     options.simple = True
+-            except SyntaxError, e:
++            except SyntaxError as e:
+                 parser = SimpleSchemaParser(argfile)
+                 schema_root = parser.parse()
+                 if not options.simple and not options.xml:
+@@ -1127,13 +1127,13 @@ def main(args):
+                 fout = open(options.output, 'w')
+                 fout.write(output)
+                 fout.close()
+-            except GSettingsSchemaConvertException, e:
++            except GSettingsSchemaConvertException as e:
+                 fout.close()
+                 if os.path.exists(options.output):
+                     os.unlink(options.output)
+                 raise e
+-    except GSettingsSchemaConvertException, e:
++    except GSettingsSchemaConvertException as e:
+         print >> sys.stderr, '%s' % e
+         return 1
index b8466d4833d29b066c87d544913009901aa9bdaa..ff365551df407b223c2de61b473d3da445746e40 100644 (file)
@@ -15,6 +15,7 @@ SRC_URI = "${GNOME_MIRROR}/GConf/${@gnome_verdir("${PV}")}/GConf-${PV}.tar.xz;na
            file://remove_plus_from_invalid_characters_list.patch \
            file://unable-connect-dbus.patch \
            file://create_config_directory.patch \
+           file://python3.patch \
 "
 
 SRC_URI[archive.md5sum] = "2b16996d0e4b112856ee5c59130e822c"
@@ -52,6 +53,8 @@ FILES_${PN} += "${libdir}/GConf/* \
                 ${datadir}/dbus-1/services/*.service \
                 ${datadir}/dbus-1/system-services/*.service \
                "
+RDEPENDS_${PN} = "python3-xml"
+
 FILES_${PN}-dev += "${datadir}/sgml/gconf/gconf-1.0.dtd"
 
 BBCLASSEXTEND = "native"