以 bb.utils.contains('DISTRO_FEATURES', 'wayland', 'west-init', '',d) 為例...
在 poky/bitbake/lib/bb/utils.py:
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.
"""
沒有留言:
張貼留言