[bitbake-devel] [PATCH v2] data_smart: Add _remove operator

Otavio Salvador otavio at ossystems.com.br
Sat Aug 31 21:46:57 UTC 2013


On Mon, Aug 26, 2013 at 11:54 AM, Chris Larson <clarson at kergoth.com> 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?

I noticed it has already been merged but I couldn't comment on this
before as I was in a work trip.

I'd like to thank you both for doing it :)


-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750



More information about the bitbake-devel mailing list