[oe] update-rc.d: don't add runtime dependency if not doing online package management; only add it to ${PN} in any case.

Phil Blundell pb at reciva.com
Fri Jun 19 07:36:17 UTC 2009


On Wed, 2009-06-17 at 17:41 -0400, Denys Dmytriyenko wrote:
> Any ideas why RDEPENDS_{PN} in "udev" recipe works, but RDEPENDS_udev doesn't? 
> It only happens with inherit update-rc.d.bbclass, which also changes 
> RDEPENDS_{PN}... I have the same issue with my own recipes, which I need to 
> fix similarly.

It's a side effect of the way that overrides work in bitbake.  What
happens is that you start with:

RDEPENDS_udev = "something"
# RDEPENDS_${PN} is not set
RDEPENDS_${PN}_append = "foo"

First, bitbake processes the _append, which causes a new variable
RDEPENDS_${PN} to be created.  (It doesn't append to RDEPENDS_udev
because, at this stage, that is a different variable name.)  So now you
have:

RDEPENDS_udev = "something"
RDEPENDS_${PN} = "foo"

Finally. bitbake expands the expressions on the left-hand side.  At this
point the latter variable's name is transformed into RDEPENDS_udev and
hence it will overwrite the former one.  Which variable "wins" in this
case is a little bit unpredictable although I think that, with the
current bitbake, a variable whose name goes through more transforming
steps is likely to defeat one whose name is simpler.

The practical effect of this is that, in almost all circumstances, you
should set and refer to RDEPENDS_${PN}, RDEPENDS_${PN}-dev and so on,
rather than pre-expanding those values by hand.

p.





More information about the Openembedded-devel mailing list