Reputation: 59
I am new to bitbake and i am learing it.
Can you please help me understand the difference between inherit Directive and INHERIT Configuration Directive?
My understanding on inherit Directive:
inherit Directive is used to inherit a class from .bbclass file into another .bbclass file or .bb(recipe) file
I am not able to understand what is INHERIT Configuration Directive?i saw the syntax INHERIT += "abc".what is it trying to do?why do we have 2 different inherit directives?
Thanks in advance
Upvotes: 1
Views: 1110
Reputation: 4344
The difference between inherit
and INHERIT
is simple and is well explained in the Yocto documentation here:
... using INHERIT to inherit a class effectively inherits the class globally
So, there are two differences between them:
inherit
only inherits a class for a given recipeINHERIT
inherits the class globally for all recipes, so all recipes have access to the classes functions or tasks, meaning if you have main tasks in that class (do_install
, do_compile
, ...) it will affect all recipes.inherit
will execute any anonymous function in the class during parsingINHERIT
will ignore any anonymous function in the class during parsing (check link)NOTE
You can develop your own class for example having your utility functions and use it globally by multiple recipes rather than inherit
ing the class for each class.
Upvotes: 3