gpt4 book ai didi

bitbake - 在哪里记录了 bitbake python 函数

转载 作者:行者123 更新时间:2023-12-03 22:31:23 25 4
gpt4 key购买 nike

我正在尝试查找“bb.utils.contains”的文档。
我在 pokey/bitbake/lib/utils.py 中找到了代码,但该代码的文档记录很差。
例如,它接受一个名为“d”的参数。什么是“d”?
你如何开始使用这样一个简短的非描述性名称?

我已经下载并搜索了所有的 yocto 和 poky 文档,并执行了一些操作
网络搜索,无济于事。

有人知道对内置 bitbake python 实用程序的很好引用吗?

最佳答案

我能找到的最好的文档是代码本身的文档字符串。见这里:https://github.com/openembedded/bitbake/blob/master/lib/bb/utils.py#L974

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.
"""

关于bitbake - 在哪里记录了 bitbake python 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24769944/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com