Use recipes but not whole layer
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello,
When a layer is included in the build (conf/bblayers.conf), all the bbappends and distro configurations, apply to the current build. Is there something additional which the build is affected after a layer included? What is the preferred way if in you are only interested in one specfic recipe of the new layer?
a) You could invalidate via BBMASK all the specific pathsb) Could somehow modify the BBFILE to remove the undesired "${LAYERDIR}/recipes-*/*/*.bbappend"?
I am not confortable with either ways, what is the official approach?
Regards
Quoted 4 lines · Oliver
When a layer is included in the build (
conf/bblayers.conf), all the bbappends and distro configurations, apply to the current build. Is there something additional which the build is affected after a layer included?
As per the Yocto Project guidelines, layers that do this are broken. A BSP layer should only introduce changes that affect the BSP, distro layers shouldn't contain general purpose recipes, and everything that is distro-specific should be isolated using overrides.
If a layer breaks these rules in dramatic ways I'd start by filing a bug or patches, but you may find the whitelist class useful:
https://github.com/ostroproject/meta-ostro/blob/master/meta-ostro/classes/whitelist.bbclass
Ross
Quoted 1 line
As per the Yocto Project guidelines, layers that do this are broken. A BSP layer should only introduce changes that affect the BSP, distro layers shouldn't contain general purpose recipes, and everything that is distro-specific should be isolated using overrides.
I was talking more generically for any type of layer. I have the feeling that many layers in our ecosystem fail to accomplish this.
I believe I understand the guidelines, based on some discussions about not including the whitelist.bbclass in OE.
But I find it not always possible to follow. Let me expose a very simple, and commom use case, a layer which contains:
recipeAboost_%.bbappend
recipeB
In order to success in generate recipeA, I need to extend the boost to expand some configuration parameters(log).On the other side someone would like to use recipeB. He/She will unwillingly inherit the boost modifications. How should this be correctly done?
Regards
Quoted 5 lines · Oliver
In order to success in generate recipeA, I need to extend the boost to expand some configuration parameters(log).
On the other side someone would like to use recipeB. He/She will unwillingly inherit the boost modifications.
The changes to boost would likely count as distro policy, so shouldn't be in the same layer as a generic purpose recipe.
Ross
Quoted 10 lines · Ross
Quoted 5 lines · Oliver
In order to success in generate recipeA, I need to extend the boost to expand some configuration parameters(log).
On the other side someone would like to use recipeB. He/She will unwillingly inherit the boost modifications.The changes to boost would likely count as distro policy, so shouldn't be in the same layer as a generic purpose recipe.
What boost changes? They may be of interest to others and we could update the recipe in oe-core.
Philip
Quoted 5 lines
Ross
Quoted 11 lines
Quoted 8 lines
Quoted 5 lines
In order to success in generate recipeA, I need to extend the boost to expand some configuration parameters(log).
On the other side someone would like to use recipeB. He/She will unwillingly inherit the boost modifications.The changes to boost would likely count as distro policy, so shouldn't be in the same layer as a generic purpose recipe.
What boost changes? They may be of interest to others and we could update the recipe in oe-core.
This particular change in boost is not relevant in fact, I just used it to explain the example.
But if you like to know the bbappend file just contained the line:
BOOST_LIBS += "log"