I'm trying to find documentation for "bb.utils.contains". I found the code in pokey/bitbake/lib/utils.py, but that code is poorly documented. For instance, it takes a parameter named "d". What is "d"? How do you even get started with a short non-descriptive name like that?
I've downloaded and searched all the yocto and poky documents, and performed a number of web searches, to no avail.
Does anybody know of a good reference to the built in bitbake python utilities?
BitBake is a make-like build tool with the special focus of distributions and packages for embedded Linux cross compilation, although it is not limited to that. It is inspired by Portage, which is the package management system used by the Gentoo Linux distribution.
bb. utils. contains is most commonly used function in Yocto. grep in poky directory returned with 696 count.
The best documentation i could find were the docstrings in the code itself. See here: 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.
"""
'd' is the current dictionary of all the values being extracted from the environment and recipes. See data.py and data_smart.py.
I agree the bitbake docs are not always complete, but there is a bitbake-dev mailing list that can help as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With