bitbake: data_smart: Allow expansion of flags in getVarFlags
Allow a list of flags to expand to be passed into getVarFlags. This is useful within bitbake itself to optimise performance of the dependency generation code. (Bitbake rev: a3ae7efdf750fc5bb9ff5a75defbcfdab1912dbe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
0902850e97
commit
a61519f3fb
|
@ -647,7 +647,7 @@ class DataSmart(MutableMapping):
|
||||||
self.varhistory.record(**loginfo)
|
self.varhistory.record(**loginfo)
|
||||||
self.dict[var][i] = flags[i]
|
self.dict[var][i] = flags[i]
|
||||||
|
|
||||||
def getVarFlags(self, var, internalflags=False):
|
def getVarFlags(self, var, expand = False, internalflags=False):
|
||||||
local_var = self._findVar(var)
|
local_var = self._findVar(var)
|
||||||
flags = {}
|
flags = {}
|
||||||
|
|
||||||
|
@ -656,7 +656,8 @@ class DataSmart(MutableMapping):
|
||||||
if i.startswith("_") and not internalflags:
|
if i.startswith("_") and not internalflags:
|
||||||
continue
|
continue
|
||||||
flags[i] = local_var[i]
|
flags[i] = local_var[i]
|
||||||
|
if expand and i in expand:
|
||||||
|
flags[i] = self.expand(flags[i], None)
|
||||||
if len(flags) == 0:
|
if len(flags) == 0:
|
||||||
return None
|
return None
|
||||||
return flags
|
return flags
|
||||||
|
|
Loading…
Reference in New Issue