我正在尝试查找“bb.utils.contains”的文档。 我在pokey/bitbake/lib/utils.py中找到了代码,但该代码的文档很差。 例如,它需要一个名为“d”的参数。那么,“d”是什么? 你该如何从这样一个简短且不具描述性的名称开始呢?
我已经下载并搜索了所有yocto和poky文档,并进行了多次网络搜索,但都没有找到。
是否有人知道内置的bitbake python工具的好参考资料?
我正在尝试查找“bb.utils.contains”的文档。 我在pokey/bitbake/lib/utils.py中找到了代码,但该代码的文档很差。 例如,它需要一个名为“d”的参数。那么,“d”是什么? 你该如何从这样一个简短且不具描述性的名称开始呢?
我已经下载并搜索了所有yocto和poky文档,并进行了多次网络搜索,但都没有找到。
是否有人知道内置的bitbake python工具的好参考资料?
我能找到的最好文档是代码本身中的docstrings。请看这里:https://github.com/openembedded/bitbake/blob/master/lib/bb/utils.py#L996
def contains(variable, checkvalues, truevalue, falsevalue, d):
"""Check if a variable contains all the values specified.
Arguments:
variable -- the variable name. This will be fetched and expanded (using
d.getVar(variable, True)) and then split into a set().
checkvalues -- if this is a string it is split on whitespace into a set(),
otherwise coerced directly into a set().
truevalue -- the value to return if checkvalues is a subset of variable.
falsevalue -- the value to return if variable is empty or if checkvalues is
not a subset of variable.
d -- the data store.
"""
'd'是从环境变量和配方中提取的所有值的当前字典。请参见data.py和data_smart.py。
我同意bitbake文档并不总是完整的,但是有一个可以提供帮助的bitbake-dev邮件列表。