summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/data.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index ecac66c6ba..876f6ca542 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -287,18 +287,19 @@ def update_data(d):
287 287
288def build_dependencies(key, keys, shelldeps, vardepvals, d): 288def build_dependencies(key, keys, shelldeps, vardepvals, d):
289 deps = set() 289 deps = set()
290 vardeps = d.getVarFlag(key, "vardeps", True)
291 try: 290 try:
292 if key[-1] == ']': 291 if key[-1] == ']':
293 vf = key[:-1].split('[') 292 vf = key[:-1].split('[')
294 value = d.getVarFlag(vf[0], vf[1], False) 293 value = d.getVarFlag(vf[0], vf[1], False)
295 else: 294 else:
296 value = d.getVar(key, False) 295 value = d.getVar(key, False)
296 varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude"]) or {}
297 vardeps = varflags.get("vardeps")
297 298
298 if key in vardepvals: 299 if "vardepvalue" in varflags:
299 value = d.getVarFlag(key, "vardepvalue", True) 300 value = varflags.get("vardepvalue")
300 elif d.getVarFlag(key, "func"): 301 elif varflags.get("func"):
301 if d.getVarFlag(key, "python"): 302 if varflags.get("python"):
302 parsedvar = d.expandWithRefs(value, key) 303 parsedvar = d.expandWithRefs(value, key)
303 parser = bb.codeparser.PythonParser(key, logger) 304 parser = bb.codeparser.PythonParser(key, logger)
304 if parsedvar.value and "\t" in parsedvar.value: 305 if parsedvar.value and "\t" in parsedvar.value:
@@ -323,16 +324,14 @@ def build_dependencies(key, keys, shelldeps, vardepvals, d):
323 varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS', True) 324 varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS', True)
324 if varflagsexcl: 325 if varflagsexcl:
325 varfdeps = [] 326 varfdeps = []
326 varflags = d.getVarFlags(key) 327 for f in varflags:
327 if varflags: 328 if f not in varflagsexcl:
328 for f in varflags: 329 varfdeps.append('%s[%s]' % (key, f))
329 if f not in varflagsexcl:
330 varfdeps.append('%s[%s]' % (key, f))
331 if varfdeps: 330 if varfdeps:
332 deps |= set(varfdeps) 331 deps |= set(varfdeps)
333 332
334 deps |= set((vardeps or "").split()) 333 deps |= set((vardeps or "").split())
335 deps -= set((d.getVarFlag(key, "vardepsexclude", True) or "").split()) 334 deps -= set(varflags.get("vardepsexclude", "").split())
336 except Exception as e: 335 except Exception as e:
337 raise bb.data_smart.ExpansionError(key, None, e) 336 raise bb.data_smart.ExpansionError(key, None, e)
338 return deps, value 337 return deps, value