All of
 help / color / mirror / Atom feed
From: Markus Lehtonen <>
Subject: [PATCH 2/2] data_smart: handle '\x7d' in python parsing
Date: Wed,  3 Feb 2016 12:33:39 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

At least ncurses recipe uses a workaround (for former bitbake python
parser) where closing curly bracket inside a python string was replaced
by '\x7d' ascii code. The previous "curly bracket matching" patch broke
parsing of constructs like this as bitbake wouldn't correctly find the
closing bracket. This patch fixes this by accepting '\x7d' as a closing

Hopefully, this patch could be reverted (and the python regexp thus
simplified) in the future after making sure that no recipes use the
'\x7d' workaround, anymore.

[YOCTO #8849]

Signed-off-by: Markus Lehtonen <>
 lib/bb/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/ b/lib/bb/
index 6069499..5f48fe3 100644
--- a/lib/bb/
+++ b/lib/bb/
@@ -41,7 +41,7 @@ logger = logging.getLogger("BitBake.Data")
 __setvar_keyword__ = ["_append", "_prepend", "_remove"]
 __setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>.*))?$')
 __expand_var_regexp__ = re.compile(r"\${[^{}@\n\t ]+}")
-__expand_python_regexp__ = re.compile(r"\${@(({[^{]*?})|.)+?}")
+__expand_python_regexp__ = re.compile(r"\${@(({[^{]*?(}|\\x7d))|.)+?}")
 def infer_caller_details(loginfo, parent = False, varval = True):
     """Save the caller the trouble of specifying everything."""

  parent reply	other threads:[~2016-02-03 10:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 10:33 [PATCH 0/2] data_smart: simple matching of curly brackets inside Python expressions Markus Lehtonen
2016-02-03 10:33 ` [PATCH 1/2] data_smart: simple bracket matching inside python expressions Markus Lehtonen
2016-02-03 15:56   ` Christopher Larson
2016-02-04  6:33     ` Markus Lehtonen
2016-02-03 10:33 ` Markus Lehtonen [this message]
2016-02-03 16:52   ` [PATCH 2/2] data_smart: handle '\x7d' in python parsing Richard Purdie
2016-02-04  6:39     ` Markus Lehtonen
2016-02-04  8:21       ` Richard Purdie
2016-02-04 17:56         ` Markus Lehtonen

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:

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

  git send-email \ \ \ \

* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.