Where are the python bitbake functions written

I am trying to find documentation for "bb.utils.contains". I found the code in pokey / bitbake / lib / utils.py, but this code is poorly documented. For example, it takes a parameter named "d". What is a "d"? How do you even start with a short, non descriptive name?

I downloaded and searched for all yocto and poky documents and performed an Internet search number to no avail.

Does anyone know of a good link to the python built-in utilities for Bitbake?

+8
source share
2 answers

The best documentation I could find was documentation lines in the code itself. See here: https://github.com/openembedded/bitbake/blob/master/lib/bb/utils.py#L971

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. """ 
+5
source

'd' is the current dictionary of all values โ€‹โ€‹extracted from the medium and recipes. See Data.py and data_smart.py.

I agree that bitbake docs are not always complete, but there is a bitbake-dev mailing list that can also help.

+1
source

Source: https://habr.com/ru/post/972279/


All Articles