[bitbake-devel] [PATCH 1/2] data_smart: simple bracket matching inside python expressions

Markus Lehtonen markus.lehtonen at linux.intel.com
Thu Feb 4 06:33:40 UTC 2016


Hi Christopher,

On 03/02/16 17:56, "Christopher Larson" <kergoth at gmail.com on behalf of clarson at kergoth.com> wrote:


On Wed, Feb 3, 2016 at 3:33 AM, Markus Lehtonen <markus.lehtonen at linux.intel.com> wrote:
This expands the python expansion regex by matching curly brackets
inside python expressions. In its simplicity it is limited: e.g. it does
not correctly handle nested curly brackets or open curly brackets (i.e.
'{' without a matching '}') inside python expressions. Making python
parsing inside data_smart fully error-free would require significantly
more work, basically using/implementing python parser to correctly
handle python strings etc.

[YOCTO #8849]

Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>

Will this cause problems with regular variable expansion nested inside of inline python, which is allowed? I.e. ${@ ... '${FOO}'}

No, it wont affect that. First of all because the variable expansion is done before python expansion – ${FOO} would be expanded before the Python regexp is evaluated. Second, the limitation about nested brackets is only about nested brackets inside the python expression (i.e. something like '${FOO${BAR}}').

Thanks,
  Markus


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20160204/a7d013c1/attachment-0002.html>


More information about the bitbake-devel mailing list