Skip to contentSkip to conversation

managing layer priorities

DISCUSSION Tomas Frydrych 3 participants 6 messages Apr 8, 2012 – Apr 9, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

Is there a way to change the priority that a layer assigns itself in its layer.conf? E.g., I want to add meta-oe alongside of meta-yocto, but I want it to have a lower priority than the latter. Currently meta-yocto gives itself "5" and meta-oe "6", I'd like to change this without having to modify meta-oe/conf/layer.conf, but can't find a way to do this.

Tomas

#1 lore raw
Quoted 5 lines · Tomas Frydrych

Is there a way to change the priority that a layer assigns itself in its layer.conf? E.g., I want to add meta-oe alongside of meta-yocto, but I want it to have a lower priority than the latter. Currently meta-yocto gives itself "5" and meta-oe "6", I'd like to change this without having to modify meta-oe/conf/layer.conf, but can't find a way to do this.

Never mind, it is possible to override these in the last layer listed in BBLAYERS.

Tomas

#2 lore raw
Quoted 9 lines · Tomas Frydrych
Quoted 5 lines · Tomas Frydrych

Is there a way to change the priority that a layer assigns itself in its layer.conf? E.g., I want to add meta-oe alongside of meta-yocto, but I want it to have a lower priority than the latter. Currently meta-yocto gives itself "5" and meta-oe "6", I'd like to change this without having to modify meta-oe/conf/layer.conf, but can't find a way to do this.

Never mind, it is possible to override these in the last layer listed in BBLAYERS.

How so?

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#3 lore raw
Quoted 8 lines · Gary Thomas
Quoted 7 lines · Tomas Frydrych
Quoted 5 lines · Tomas Frydrych

Is there a way to change the priority that a layer assigns itself in its layer.conf? E.g., I want to add meta-oe alongside of meta-yocto, but I want it to have a lower priority than the latter. Currently meta-yocto gives itself "5" and meta-oe "6", I'd like to change this without having to modify meta-oe/conf/layer.conf, but can't find a way to do this.

Quoted 4 lines
Quoted 2 lines

Never mind, it is possible to override these in the last layer listed in BBLAYERS.

How so?

You can set the various BBFILE_PRIORITY_**** and other variables in the layer.conf for the last layer listed in your bblayers.conf. The layer priorities get evaluated only after all of the layer.conf files have been parsed, so anything that is set in the last layer.conf will be the final value. I use the Yocto model where (unlike with OE layers) the layer.conf prepends its layer path to BBPATH, so my custom layer is last, but I imagine it would be possible to create a fake layer with no recipes just for this specific purpose.

Tomas

Quoted 1 line
#4 lore raw
Quoted 14 lines · On Monday 09 April 2012 14:58:49 Tomas Frydrych wrote:
Quoted 8 lines · Gary Thomas
Quoted 7 lines · Tomas Frydrych
Quoted 5 lines · Tomas Frydrych

Is there a way to change the priority that a layer assigns itself in its layer.conf? E.g., I want to add meta-oe alongside of meta-yocto, but I want it to have a lower priority than the latter. Currently meta-yocto gives itself "5" and meta-oe "6", I'd like to change this without having to modify meta-oe/conf/layer.conf, but can't find a way to do this.

Quoted 4 lines
Quoted 2 lines

Never mind, it is possible to override these in the last layer listed in BBLAYERS.

How so?

Quoted 8 lines

You can set the various BBFILE_PRIORITY_**** and other variables in the layer.conf for the last layer listed in your bblayers.conf. The layer priorities get evaluated only after all of the layer.conf files have been parsed, so anything that is set in the last layer.conf will be the final value. I use the Yocto model where (unlike with OE layers) the layer.conf prepends its layer path to BBPATH, so my custom layer is last, but I imagine it would be possible to create a fake layer with no recipes just for this specific purpose.

I realise what you're trying to do, but you should bear in mind when you do this you are relying on unintentional behaviour that may change in future.

There were some discussions at the recent BSP summit about improving bitbake so that layer priorities work in a more helpful manner. Also worth noting is that work to split up meta-oe is ongoing, so it may be in the near future that you don't have to shuffle layers around such that meta-oe doesn't have any undesired effects.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#5 lore raw

Hi Paul,

Quoted 3 lines · Paul Eggleton

On Monday 09 April 2012 14:58:49 Tomas Frydrych wrote:
I realise what you're trying to do, but you should bear in mind when you do this you are relying on unintentional behaviour that may change in future.

I am not sure whether unintentional is an accurate description; layer priority is explicitly and intentionally the function of other layers due to inter-layer dependency. So I prefer to think of it as an undocumented feature. :-) But I know, if it does not work, it's my own fault.

The reason for doing this is that I'd like to be able to treat an external layer as a read-only entity, and to enforce this. My experience suggests that if you fork external layers alongside your custom layers, this over time leads to unnecessary maintenance costs. On the other hand, if each external layer is a read-only entity, it can be integrated as a read-only git submodule, and no naughty developers will then make changes to it.

Tomas