[oe] PREFERRED_PROVIDER_x/y = "z" versus PREFERRED_PROVIDER += " x/y:z"

Phil Blundell pb at reciva.com
Thu Sep 4 21:34:39 UTC 2008


On Thu, 2008-09-04 at 22:38 +0200, Leon Woestenberg wrote:
> Hello,
> 
> can someone explain the (subtle) differences between
> 
> PREFERRED_PROVIDER_x/y = "z"
> PREFERRED_PROVIDER += " x/y:z"
> ?
> 
> And also (to be completely clear) when to use what?

As far as I remember, there's no real difference between those two
things at the bitbake level.  I think the latter syntax came first, but
proved cumbersome, and the former was added afterwards as a more
convenient mechanism.  The main advantage of the former syntax is that
it stacks: you can have an include file that sets PREFERRED_PROVIDER_foo
to something, and a later-included file can easily override that
assignment or defeat it altogether.  With the latter syntax, anything
other than a straightforward append involves a lot of messy string
processing.

Personally I would recommend that you always use the former syntax.  I
can't think of any situation where the latter is necessary or desirable.

(Also, as a trivial pedantic point, note that the += operator already
adds a space for you, so in your second example there is no need to add
one explicitly.)

p.






More information about the Openembedded-devel mailing list