[OE-core] DEPENDS tranlation with BBCLASSEXTEND

Chris Larson clarson at kergoth.com
Sun Mar 27 23:03:22 UTC 2011


On Sun, Mar 27, 2011 at 1:08 PM, Khem Raj <raj.khem at gmail.com> wrote:
> I observed that if I have
> DEPENDS = "a b" in recipe.bb which has BBCLASSEXTEND = "native"
> then dependecies for recipe-native shows a-native b-native so far so
> good
>
> Now if I want to add a dependency which only is needed for native recipe
> I do
>
> DEPENDS_virtclass-native += "c-native"
>
> what this does is it will ignore a-native and b-native dependencies and
> only adds "c-native" to depends of native recipe
>
> DEPENDS_virtclass-native_append = " c-native"
>
> This does what I wanted i.e. have deps on a-native b-native c-native
>
> I think behavior of += or _append should be similar. Is my understanding
> correct ?

They've never been the same.  += is immediate, _append is delayed.  If
a class, say, native.bbclass, defines the variable with ?=, and you
used += before the inherit, then it will have a value, and the ?=
won't assign.  I assume native.bbclass does it this way today so you
can override the automatic behavior by defining the variable yourself,
but I'll let Richard speak to that decision.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics




More information about the Openembedded-core mailing list