[OE-core] [PATCH 01/27] lib/oe/recipeutils: properly split unexpanded variable values

Christopher Larson clarson at kergoth.com
Tue Sep 22 23:00:47 UTC 2015


On Tue, Sep 22, 2015 at 9:21 AM, Paul Eggleton <
paul.eggleton at linux.intel.com> wrote:

> Variables such as SRC_URI which are space-separated may also contain
> Python expressions (${@...}) which themselves contain spaces that
> shouldn't be split when splitting the value into items. In order to
> ensure this we need to use a custom splitting function instead of just
> string.split().
>
> This issue could be seen when doing "devtool modify sudo", adding a
> commit to the resulting source repository then "devtool update-recipe" -
> the Python expression in SRC_URI was being unnecessarily broken onto
> multiple lines.
>
> Fixes [YOCTO #8046].
>
> Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
>

This is interesting, I recently had a need for a split like that too. I had
written a prototype class which automatically disables all packageconfigs
which introduce optional dependencies, to see how much it would reduce the
dependencies, and wanted to ignore bits dependent on DISTRO_FEATURES, so
wanted to ignore all inline python.
https://gist.github.com/kergoth/2c556d9e34cbcd03cb82#file-packageconfig-backdel-bbclass-L107-L122
is my version of it. Possibly overly complex, since my version produces an
extremely lightweight parse tree (list-based) for nested references, and
then has to flatten it back out. I found it interesting that we both had a
need for this sort of functionality -- perhaps a split function along these
lines would be of use in one of the oe python package modules.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150922/cfd5fb0f/attachment-0002.html>


More information about the Openembedded-core mailing list