aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-19 12:38:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-19 12:47:09 +0000
commitb7a81cb91e82ba64b63c9153dc161a2ab4696715 (patch)
tree4ae89a4eb72960ec2cc2fe1f7e01b0453ed7dbad /lib
parent2d14d6004b6add5ce07295fff1144ade2e54e1c9 (diff)
downloadbitbake-b7a81cb91e82ba64b63c9153dc161a2ab4696715.zip
bitbake-b7a81cb91e82ba64b63c9153dc161a2ab4696715.tar.gz
bitbake-b7a81cb91e82ba64b63c9153dc161a2ab4696715.tar.bz2
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). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/build.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 0d0100a..4631abd 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -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')