<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 22, 2015 at 9:21 AM, Paul Eggleton <span dir="ltr"><<a href="mailto:paul.eggleton@linux.intel.com" target="_blank">paul.eggleton@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":s5" class="" style="overflow:hidden">Variables such as SRC_URI which are space-separated may also contain<br>
Python expressions (${@...}) which themselves contain spaces that<br>
shouldn't be split when splitting the value into items. In order to<br>
ensure this we need to use a custom splitting function instead of just<br>
string.split().<br>
<br>
This issue could be seen when doing "devtool modify sudo", adding a<br>
commit to the resulting source repository then "devtool update-recipe" -<br>
the Python expression in SRC_URI was being unnecessarily broken onto<br>
multiple lines.<br>
<br>
Fixes [YOCTO #8046].<br>
<br>
Signed-off-by: Paul Eggleton <<a href="mailto:paul.eggleton@linux.intel.com">paul.eggleton@linux.intel.com</a>></div></blockquote></div><br>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. <a href="https://gist.github.com/kergoth/2c556d9e34cbcd03cb82#file-packageconfig-backdel-bbclass-L107-L122">https://gist.github.com/kergoth/2c556d9e34cbcd03cb82#file-packageconfig-backdel-bbclass-L107-L122</a> 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.<br>-- <br><div class="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>