diff options
| author | Joe Slater <joe.slater@windriver.com> | 2020-07-24 15:34:15 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-27 10:37:57 +0100 |
| commit | 5008ee45e41ac99f7867e929124c77b539fe4fb9 (patch) | |
| tree | b605df45f5542a84b286adccfe92ab41ee5a4376 /meta/recipes-gnome/gnome/gconf/python3.patch | |
| parent | 7d82155fd5a4718d7375327a36651413fcc47d68 (diff) | |
| download | poky-5008ee45e41ac99f7867e929124c77b539fe4fb9.tar.gz | |
gconf: use python3
Modify gsettings-schema-convert to use python3. Also
add RDEPEND on python3-xml.
(From OE-Core rev: ce6e5da12fb004811270a37941094c9bd8d7e161)
Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome/gnome/gconf/python3.patch')
| -rw-r--r-- | meta/recipes-gnome/gnome/gconf/python3.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gnome/gconf/python3.patch b/meta/recipes-gnome/gnome/gconf/python3.patch new file mode 100644 index 0000000000..7c022a2e1b --- /dev/null +++ b/meta/recipes-gnome/gnome/gconf/python3.patch | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | gconf: use python3 | ||
| 2 | |||
| 3 | Convert gsettings-schema-convert to use python3. | ||
| 4 | |||
| 5 | Upstream-Status: Inappropriate [gconf is deprecated] | ||
| 6 | |||
| 7 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
| 8 | |||
| 9 | |||
| 10 | --- a/gsettings/gsettings-schema-convert | ||
| 11 | +++ b/gsettings/gsettings-schema-convert | ||
| 12 | @@ -1,4 +1,4 @@ | ||
| 13 | -#!/usr/bin/env python | ||
| 14 | +#!/usr/bin/env python3 | ||
| 15 | # vim: set ts=4 sw=4 et: coding=UTF-8 | ||
| 16 | # | ||
| 17 | # Copyright (c) 2010, Novell, Inc. | ||
| 18 | @@ -603,7 +603,7 @@ class SimpleSchemaParser: | ||
| 19 | for line in lines: | ||
| 20 | current_line_nb += 1 | ||
| 21 | self.parse_line(line) | ||
| 22 | - except GSettingsSchemaConvertException, e: | ||
| 23 | + except GSettingsSchemaConvertException as e: | ||
| 24 | raise GSettingsSchemaConvertException('%s:%s: %s' % (os.path.basename(self.file), current_line_nb, e)) | ||
| 25 | |||
| 26 | return self.root | ||
| 27 | @@ -1095,7 +1095,7 @@ def main(args): | ||
| 28 | try: | ||
| 29 | parser = GConfSchemaParser(argfile, options.gettext_domain, options.schema_id, options.keep_underscores) | ||
| 30 | schema_root = parser.parse() | ||
| 31 | - except SyntaxError, e: | ||
| 32 | + except SyntaxError as e: | ||
| 33 | raise GSettingsSchemaConvertException('\'%s\' does not look like a valid gconf schema file: %s' % (argfile, e)) | ||
| 34 | else: | ||
| 35 | # autodetect if file is XML or not | ||
| 36 | @@ -1104,7 +1104,7 @@ def main(args): | ||
| 37 | schema_root = parser.parse() | ||
| 38 | if not options.simple and not options.xml: | ||
| 39 | options.simple = True | ||
| 40 | - except SyntaxError, e: | ||
| 41 | + except SyntaxError as e: | ||
| 42 | parser = SimpleSchemaParser(argfile) | ||
| 43 | schema_root = parser.parse() | ||
| 44 | if not options.simple and not options.xml: | ||
| 45 | @@ -1127,13 +1127,13 @@ def main(args): | ||
| 46 | fout = open(options.output, 'w') | ||
| 47 | fout.write(output) | ||
| 48 | fout.close() | ||
| 49 | - except GSettingsSchemaConvertException, e: | ||
| 50 | + except GSettingsSchemaConvertException as e: | ||
| 51 | fout.close() | ||
| 52 | if os.path.exists(options.output): | ||
| 53 | os.unlink(options.output) | ||
| 54 | raise e | ||
| 55 | |||
| 56 | - except GSettingsSchemaConvertException, e: | ||
| 57 | + except GSettingsSchemaConvertException as e: | ||
| 58 | print >> sys.stderr, '%s' % e | ||
| 59 | return 1 | ||
| 60 | |||
