summaryrefslogtreecommitdiffstats
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-28 15:08:34 +0000
commit591b5b241d78e9d4ef8d5d3dd6280f7a4ff7ee17 (patch)
tree6d92c4c48bdc14a256264efb19dcf45a34b08db3
parent8240adb06b05f693a53c6cdda9e6ffc51e036c82 (diff)
downloadpoky-591b5b241d78e9d4ef8d5d3dd6280f7a4ff7ee17.tar.gz
poky-591b5b241d78e9d4ef8d5d3dd6280f7a4ff7ee17.tar.bz2
poky-591b5b241d78e9d4ef8d5d3dd6280f7a4ff7ee17.zip
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>
-rw-r--r--bitbake/lib/bb/build.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 0d0100a064..4631abdde5 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/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')