1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +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
+2 -2
View File
@@ -296,8 +296,8 @@ def build_dependencies(key, keys, shelldeps, d):
parser = d.expandWithRefs(d.getVar(key, False), key)
deps |= parser.references
deps = deps | (keys & parser.execs)
deps |= set((d.getVarFlag(key, "vardeps") or "").split())
deps -= set((d.getVarFlag(key, "vardepsexclude") or "").split())
deps |= set((d.getVarFlag(key, "vardeps", True) or "").split())
deps -= set((d.getVarFlag(key, "vardepsexclude", True) or "").split())
except:
bb.note("Error expanding variable %s" % key)
raise
+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)