Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] glib: Make glib-mkenums ignore unknown per value options
Date: Sat, 28 Apr 2018 03:54:42 +0200	[thread overview]
Message-ID: <20180428015442.5162-1-pkj@axis.com> (raw)

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>
---
 ...s-Ignore-other-per-value-options-than-ski.patch | 32 ++++++++++++++++++++++
 meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb      |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-glib-mkenums-Ignore-other-per-value-options-than-ski.patch

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
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
index faf594569d..53fa07e74c 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
@@ -16,6 +16,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
            file://0001-Do-not-ignore-return-value-of-write.patch \
            file://0001-Test-for-pthread_getname_np-before-using-it.patch \
            file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
+           file://0001-glib-mkenums-Ignore-other-per-value-options-than-ski.patch \
            "
 
 SRC_URI_append_class-native = " file://relocate-modules.patch"
-- 
2.12.0



                 reply	other threads:[~2018-04-28  1:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180428015442.5162-1-pkj@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox