[bitbake-devel] [PATCH v2] data_smart: Add _remove operator
Chris Larson
clarson at kergoth.com
Mon Aug 26 14:54:56 UTC 2013
On Sat, Aug 24, 2013 at 7:53 AM, Richard Purdie <
richard.purdie at linuxfoundation.org> wrote:
> @@ -583,6 +588,14 @@ class DataSmart(MutableMapping):
> value = copy.copy(local_var["defaultval"])
> if expand and value:
> value = self.expand(value, None)
> + if value and flag == "_content" and local_var and "_removeactive"
> in local_var:
> + for i in local_var["_removeactive"]:
> + if " " + i + " " in value:
> + value = value.replace(" " + i + " ", " ")
> + if value.startswith(i + " "):
> + value = value[len(i + " "):]
> + if value.endswith(" " + i):
> + value = value[:-len(" " + i)]
>
I'm curious, did you profile this implementation vs a split-filter-rejoin?
--
Christopher Larson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20130826/bf321a9d/attachment-0002.html>
More information about the bitbake-devel
mailing list