summaryrefslogtreecommitdiffstats
path: root/lib/bb/build.py
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2019-04-29 16:11:59 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-30 12:03:58 +0100
commitb1ad36169c2ad189d84c53c707b66c12d5ff812f (patch)
tree0a64a54764d6c76e1f4c4ebe31787e8a0291104c /lib/bb/build.py
parent675689aa7cc7287efecf8ef775ca2059369167f1 (diff)
downloadbitbake-b1ad36169c2ad189d84c53c707b66c12d5ff812f.tar.gz
build.py: check dependendent task for addtask
The following command is incorrect, but was ignored silently, that may suprise users: addtask task after task_not_existed This patch can check and warn for it. It would be better to also check "before" tasks, but there is no easier way to do it. [YOCTO #13282] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/build.py')
-rw-r--r--lib/bb/build.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 7571421d7..a83de8d73 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -815,6 +815,9 @@ def add_tasks(tasklist, d):
task_deps['parents'][task] = []
if 'deps' in flags:
for dep in flags['deps']:
+ # Check and warn for "addtask task after foo" while foo does not exist
+ if not dep in tasklist:
+ bb.warn('%s: dependent task %s does not exist' % (d.getVar('PN'), dep))
dep = d.expand(dep)
task_deps['parents'][task].append(dep)