我是Bitbake的新手,我正在学习。
您能帮我了解继承指令与继承配置指令之间的区别吗?
我对继承指令的理解:
继承指令用于从.bbclass文件继承一个.bbclass文件到另一个.bbclass文件或.bb(配方)文件
我无法理解什么是继承配置指令?看到语法继承 +=“ ABC”。它要做什么?为什么我们有2个不同的继承指令?
提前致谢
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
发布评论
评论(1)
继承
和继承
之间的差异很简单,并且在yocto文档在这里:内,它们之间有两个区别:
sashit
仅继承给定配方sashit
sasenit 在全球范围内继承该类食谱,因此所有配方都可以访问类功能或任务,这意味着如果您在该类中具有主要任务(do_install
,do_compile
,...),它将影响所有食谱。sashit
将在解析期间执行类中的任何匿名函数sashit
将忽略类解析过程中的任何匿名函数(检查 link )=“ https://www.yoctoproject.org/docs/current/ref-manual/ref-manual/ref-manual.html#var-inherit >
您可以开发自己的课程,例如拥有实用程序功能,并通过多个配方在全球使用它,而不是
继承
为每个类使用。The difference between
inherit
andINHERIT
is simple and is well explained in the Yocto documentation here: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.