bitbake: build.py: Don't return dependencies for tasks which don't exist

If for example you deltask do_build but it has recrdeps set, its confusing
to have that list returned when the task no longer exists (same would apply
to deps too  if it was set after the deltask).

(Bitbake rev: b7a81cb91e82ba64b63c9153dc161a2ab4696715)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2017-12-19 12:38:20 +00:00
parent 8240adb06b
commit 591b5b241d

View File

@@ -872,6 +872,12 @@ def preceedtask(task, with_recrdeptasks, d):
that this may lead to the task itself being listed.
"""
preceed = set()
# Ignore tasks which don't exist
tasks = d.getVar('__BBTASKS', False)
if task not in tasks:
return preceed
preceed.update(d.getVarFlag(task, 'deps') or [])
if with_recrdeptasks:
recrdeptask = d.getVarFlag(task, 'recrdeptask')