Skip to contentSkip to conversation

RDEPENDS_${PN} overwrites RDEPENDS_foo - bug or feature?

DISCUSSION Stanislav Brabec 4 participants 4 messages Jul 20, 2010

lore
Share & tools
lore
#0 lore raw

While verifying all aspects of proposed udev change, I experienced a strange behavior of an udev recipe with RDEPENDS_udev:

RDEPENDS_udev is always ignored. Searching in deep, I found that RDEPENDS_${PN} defined in update-rc.d.bbclass overwrites RDEPENDS_udev.

Once RDEPENDS_${PN} is defined, RDEPENDS_udev has no effect.

Is it a bug or documented feature?

Signature · 3 lines
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
#1 lore raw

2010/7/20 Stanislav Brabec <[email protected]>

Quoted 8 lines

While verifying all aspects of proposed udev change, I experienced a strange behavior of an udev recipe with RDEPENDS_udev:

RDEPENDS_udev is always ignored. Searching in deep, I found that RDEPENDS_${PN} defined in update-rc.d.bbclass overwrites RDEPENDS_udev.

Once RDEPENDS_${PN} is defined, RDEPENDS_udev has no effect.

Not an expert in this, but would RDEPENDS_${PN}_udev (or perhaps RDEPENDS_udev_${PN}) do the trick ?
Ofc this is just a suggested workaround, no idea if what you describe is desired or not.

Frans

Quoted 15 lines

Is it a bug or documented feature?

--

________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus <http://www.penguin.cz/%7Eutx/zaurus>

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#2 lore raw
In reply to Stanislav Brabec
Quoted 9 lines · Stanislav Brabec

While verifying all aspects of proposed udev change, I experienced a strange behavior of an udev recipe with RDEPENDS_udev:

RDEPENDS_udev is always ignored. Searching in deep, I found that RDEPENDS_${PN} defined in update-rc.d.bbclass overwrites RDEPENDS_udev.

Once RDEPENDS_${PN} is defined, RDEPENDS_udev has no effect.

Is it a bug or documented feature?

Neither, it's just the way bitbake works today. When the name of a variable includes references to other variables like this, they aren't expanded until the end of the parsing, and if a variable already existed with the new name, it gets overwritten. One could argue that bitbake should error in this case, but that wouldn't happen anytime soon due to the change in behavior.
It wouldn't go into 1.10, but whatever comes after that, and 1.10 isn't
even out yet.

In the meantime, you can check for this. INHERIT += "recipe_sanity", then bitbake -c recipe_sanity udev, or bitbake -c recipe_sanity_all udev to check it and its dependencies.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#3 lore raw
In reply to Stanislav Brabec
Quoted 9 lines · Stanislav Brabec

While verifying all aspects of proposed udev change, I experienced a strange behavior of an udev recipe with RDEPENDS_udev:

RDEPENDS_udev is always ignored. Searching in deep, I found that RDEPENDS_${PN} defined in update-rc.d.bbclass overwrites RDEPENDS_udev.

Once RDEPENDS_${PN} is defined, RDEPENDS_udev has no effect.

Is it a bug or documented feature?

Possibly neither of the above. It's not a bug, but I'm not certain that it is very well documented either.

p.