[bitbake-devel] [PATCH v2] data_smart: Add _remove operator
Richard Purdie
richard.purdie at linuxfoundation.org
Mon Aug 26 15:12:35 UTC 2013
On Mon, 2013-08-26 at 07:54 -0700, Chris Larson wrote:
> 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?
No, in retrospect, that might have been better. I'll take a patch to
update it :)
Cheers,
Richard
More information about the bitbake-devel
mailing list