Skip to contentSkip to conversation

require statement does not honor .bbappend

DISCUSSION Gary Thomas 2 participants 4 messages Feb 2, 2012 – Feb 3, 2012

lore
Share & tools
lore
#0 lore raw

This is really a bitbake problem, but I'll bring it up here.

I have a statement like this in one of my recipes:
require xyz.bb

If I also have within my layers a xyz.bbappend file, it gets processed when I build xyz, e.g.
% bitbake xyz
but is ignored when I only 'require' that recipe.

Should it not be always processed?

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw
Quoted 11 lines · Gary Thomas

This is really a bitbake problem, but I'll bring it up here.

I have a statement like this in one of my recipes:
require xyz.bb

If I also have within my layers a xyz.bbappend file, it gets processed when I build xyz, e.g.
% bitbake xyz
but is ignored when I only 'require' that recipe.

Should it not be always processed?

No, as designed and implemented you can't bbappend to anything being used as an include (or require), only the final .bb file.

Cheers,

Richard

#2 lore raw
Quoted 11 lines · Richard Purdie
Quoted 10 lines · Gary Thomas

This is really a bitbake problem, but I'll bring it up here.

I have a statement like this in one of my recipes:
require xyz.bb

If I also have within my layers a xyz.bbappend file, it gets processed when I build xyz, e.g.
% bitbake xyz
but is ignored when I only 'require' that recipe.

Quoted 4 lines
Quoted 1 line

Should it not be always processed?

No, as designed and implemented you can't bbappend to anything being used as an include (or require), only the final .bb file.

Bummer. What's the rationale behind this [restriction]?

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#3 lore raw
Quoted 12 lines · Gary Thomas
Quoted 11 lines · Richard Purdie
Quoted 10 lines · Gary Thomas

This is really a bitbake problem, but I'll bring it up here.

I have a statement like this in one of my recipes:
require xyz.bb

If I also have within my layers a xyz.bbappend file, it gets processed when I build xyz, e.g.
% bitbake xyz
but is ignored when I only 'require' that recipe.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Should it not be always processed?

No, as designed and implemented you can't bbappend to anything being used as an include (or require), only the final .bb file.

Bummer. What's the rationale behind this [restriction]?

Trying to implement generic "append" files to conf and inc files was going to be a significant headache for the parser and cache logic, create a pile of ordering issues and was going to mean significant code changes. The bbappend files were simple to understand and easy to implement by comparison.

At the time, bbappend was seen as a sideline feature by most so we went for the less invasive and simpler implementation (which was simpler to use too).

Cheers,

Richard