[bitbake-devel] Override a "_remove" operator in bbappend file

Paul Eggleton paul.eggleton at linux.intel.com
Tue Sep 22 14:19:26 UTC 2015


Hi Tim,

On Tuesday 22 September 2015 13:40:49 Tim Jaacks wrote:
> Hello everyone,
> 
> I have a problem with bitbake's "_remove" operator. Perhaps someone can help
> me out.
> 
> Suppose I have three layers:
>  - meta-1
>  - meta-2
>  - meta-3
> 
> In meta-1, there is a recipe "foo.bb", containing a variable:
> FOO = "bar baz"
> 
> In meta-2, there is an append file "foo.bbappend", which changes the
> variable using the "_remove" operator: FOO_remove = "bar"
> 
> The resulting value of the FOO variable is " baz".
> 
> Now I want to re-add "bar" to the FOO variable in meta-3, without changing
> the other layers. How is that possible?
> 
> I tried everything I could think of, including several combinations of
> "_append", "_prepend", machine-specific overrides, "_forcevariable" or
> setting the variable to a hard-coded value. Nothing could bring back "bar".
> It seems as if the "_remove" operator is always executed at the very end of
> the variable calculation, come what may. The layer priority seems to not
> have any impact on this.
> 
> Is this a design fault? Or am I missing something?
> Any hints on this would be helpful, thanks in advance.

I'm afraid you cannot. _remove is intended to be final i.e. "remove this after 
any and all other operations that might have added it". If you're finding a 
_remove in another layer that's doing something you don't want, then the layer 
is imposing policy on you that it probably shouldn't be.

Is this _remove in a public layer? If so which layer and what is it?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the bitbake-devel mailing list