1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

bitbake: add optional expansion to getVarFlag()

Add a parameter to getVarFlag() to auto-expand the value of the flag. This
makes getVarFlag() more consistent with getVar(), and allows expansion of
vardeps and vardepsexclude (which has been done in this commit).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton
2010-12-10 15:30:30 +00:00
committed by Richard Purdie
parent a52e4063f4
commit 80e6408b9f
2 changed files with 8 additions and 5 deletions
+6 -3
View File
@@ -277,12 +277,15 @@ class DataSmart:
self._makeShadowCopy(var)
self.dict[var][flag] = flagvalue
def getVarFlag(self, var, flag):
def getVarFlag(self, var, flag, exp = False):
local_var = self._findVar(var)
value = None
if local_var:
if flag in local_var:
return copy.copy(local_var[flag])
return None
value = copy.copy(local_var[flag])
if exp and value:
value = self.expand(value, None)
return value
def delVarFlag(self, var, flag):
local_var = self._findVar(var)