mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 05:39:39 +01: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:
committed by
Richard Purdie
parent
a52e4063f4
commit
80e6408b9f
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user