aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2018-04-28 03:54:42 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-04 09:55:00 +0100
commitca6c82255fbf0ce359b6205c442e165219a3216e (patch)
treec0ab0237d513074a78d1a5242c54f51ea0d6f313 /meta/recipes-core/glib-2.0/glib-2.0
parent11ee7989b2f0709119c450819cd66bad70082a93 (diff)
downloadopenembedded-core-contrib-ca6c82255fbf0ce359b6205c442e165219a3216e.tar.gz
glib: Make glib-mkenums ignore unknown per value options
If some other per value option was present than 'skip' or 'nick' then a KeyError would occur. Ignoring such options matches the behaviour of the old, Perl-based glib-mkenums. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-glib-mkenums-Ignore-other-per-value-options-than-ski.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-glib-mkenums-Ignore-other-per-value-options-than-ski.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-glib-mkenums-Ignore-other-per-value-options-than-ski.patch
new file mode 100644
index 0000000000..c87635a082
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-glib-mkenums-Ignore-other-per-value-options-than-ski.patch
@@ -0,0 +1,32 @@
+From 12ffb50d587003a46678567b771c6e984035a5e9 Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Sat, 28 Apr 2018 03:07:50 +0200
+Subject: [PATCH] glib-mkenums: Ignore other per value options than 'skip' and
+ 'nick'
+
+If some other per value option was present than 'skip' or 'nick' then
+a KeyError would occur. Ignoring such options matches the behaviour of
+the old, Perl-based glib-mkenums.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=795008]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ gobject/glib-mkenums.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
+index fe9a10756..4ccc1f458 100755
+--- a/gobject/glib-mkenums.in
++++ b/gobject/glib-mkenums.in
+@@ -218,7 +218,7 @@ def parse_entries(file, file_name):
+ if options is not None:
+ options = parse_trigraph(options)
+ if 'skip' not in options:
+- entries.append((name, value, options['nick']))
++ entries.append((name, value, options.get('nick', None)))
+ else:
+ entries.append((name, value))
+ elif re.match(r's*\#', line):
+--
+2.12.0
+