summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/data.py50
1 files changed, 25 insertions, 25 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 22d314d6c2..bfaa0410ea 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -262,6 +262,31 @@ def emit_func_python(func, o=sys.__stdout__, d = init()):
262 newdeps -= seen 262 newdeps -= seen
263 263
264def build_dependencies(key, keys, shelldeps, varflagsexcl, ignored_vars, d): 264def build_dependencies(key, keys, shelldeps, varflagsexcl, ignored_vars, d):
265 def handle_contains(value, contains, exclusions, d):
266 newvalue = []
267 if value:
268 newvalue.append(str(value))
269 for k in sorted(contains):
270 if k in exclusions or k in ignored_vars:
271 continue
272 l = (d.getVar(k) or "").split()
273 for item in sorted(contains[k]):
274 for word in item.split():
275 if not word in l:
276 newvalue.append("\n%s{%s} = Unset" % (k, item))
277 break
278 else:
279 newvalue.append("\n%s{%s} = Set" % (k, item))
280 return "".join(newvalue)
281
282 def handle_remove(value, deps, removes, d):
283 for r in sorted(removes):
284 r2 = d.expandWithRefs(r, None)
285 value += "\n_remove of %s" % r
286 deps |= r2.references
287 deps = deps | (keys & r2.execs)
288 return value
289
265 deps = set() 290 deps = set()
266 try: 291 try:
267 if key[-1] == ']': 292 if key[-1] == ']':
@@ -277,31 +302,6 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, ignored_vars, d):
277 vardeps = varflags.get("vardeps") 302 vardeps = varflags.get("vardeps")
278 exclusions = varflags.get("vardepsexclude", "").split() 303 exclusions = varflags.get("vardepsexclude", "").split()
279 304
280 def handle_contains(value, contains, exclusions, d):
281 newvalue = []
282 if value:
283 newvalue.append(str(value))
284 for k in sorted(contains):
285 if k in exclusions or k in ignored_vars:
286 continue
287 l = (d.getVar(k) or "").split()
288 for item in sorted(contains[k]):
289 for word in item.split():
290 if not word in l:
291 newvalue.append("\n%s{%s} = Unset" % (k, item))
292 break
293 else:
294 newvalue.append("\n%s{%s} = Set" % (k, item))
295 return "".join(newvalue)
296
297 def handle_remove(value, deps, removes, d):
298 for r in sorted(removes):
299 r2 = d.expandWithRefs(r, None)
300 value += "\n_remove of %s" % r
301 deps |= r2.references
302 deps = deps | (keys & r2.execs)
303 return value
304
305 if "vardepvalue" in varflags: 305 if "vardepvalue" in varflags:
306 value = varflags.get("vardepvalue") 306 value = varflags.get("vardepvalue")
307 elif varflags.get("func"): 307 elif varflags.get("func"):