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

Peter Seebach peter.seebach at windriver.com
Wed Mar 13 18:28:57 UTC 2013


On Sun, 10 Mar 2013 20:39:07 +0000
Paul Eggleton <paul.eggleton at linux.intel.com> wrote:

> I can't recall if we've discussed this before, but shouldn't we be looking at 
> introducing some understanding of list type variables into BitBake itself? If 
> BitBake knew the variable was a list it would be possible to have language 
> elements that understood how to behave in this situation.

I rather like this. I would like to have _remove, and it may even make sense
to adopt _remove in the short term, but really I think most of the things
where we're using append/remove should probably be lists, which would also
eliminate the entire category of bugs in which it is unclear whether or not
to add a space.

Rough thoughts about implementation: Listness could be a flag.

LIST[list] = " "
LIST = "blah blah blah"
# Oh, hey, what if...
PATH[list] = ":"

or as shorthand:

LIST = [blah blah blah]

If this is done, the behavior of append/prepend is slightly altered (to
always ensure separators are added when needed), and then we could more
easily handle the remove case, too.

That said: I'd rather see a plain _remove go in than wait on a larger and
fancier design.

-s
-- 
Listen, get this.  Nobody with a good compiler needs to be justified.




More information about the bitbake-devel mailing list