Is inheriting a bbclass multiple times well defined?


Heinz Wrobel
 

Hi,

 

If I “inherit” a bbclass multiple times in a recipe, is the result well defined or is that undefined behavior for bitbake? I couldn’t find docs that state anything about that and the bitbake sources are less then obvious to me.

I’d rather not go empirical if a clear definition of the behavior exists.

 

Assuming it is well defined, is it harmful to do that, or benign? If ok, will, e.g., the first inheritance for a class take hold and the others be ignored?

 

An example for that situation would be an image recipe that is built from two includes that each do the same inheritance for different reasons, leading possibly to repeated inheritance of classes in one recipe.

 

Thanks,

 

Heinz


Richard Purdie
 

On Wed, 2022-04-27 at 12:14 +0000, Heinz Wrobel wrote:
Hi,
 
If I “inherit” a bbclass multiple times in a recipe, is the result well
defined or is that undefined behavior for bitbake?
Well defined, it will effectively ignore any inherit after the first.

I couldn’t find docs that state anything about that and the bitbake sources
are less then obvious to me.
I’d rather not go empirical if a clear definition of the behavior exists.
 
Assuming it is well defined, is it harmful to do that, or benign? If ok, will,
e.g., the first inheritance for a class take hold and the others be ignored?
It is well defined.

Cheers,

Richard