summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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:05:24 +0100
commite236735d4520fc25a615ed92097fb04ed19f85ba (patch)
tree02b40478d5fbe590f568150f13dcc1f87d8b1643 /bitbake/lib
parent82300691b045729dd35aec6878b4c199bea835fc (diff)
downloadpoky-e236735d4520fc25a615ed92097fb04ed19f85ba.tar.gz
bitbake: 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] (Bitbake rev: b1ad36169c2ad189d84c53c707b66c12d5ff812f) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/build.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 7571421d71..a83de8d73e 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -815,6 +815,9 @@ def add_tasks(tasklist, d):
815 task_deps['parents'][task] = [] 815 task_deps['parents'][task] = []
816 if 'deps' in flags: 816 if 'deps' in flags:
817 for dep in flags['deps']: 817 for dep in flags['deps']:
818 # Check and warn for "addtask task after foo" while foo does not exist
819 if not dep in tasklist:
820 bb.warn('%s: dependent task %s does not exist' % (d.getVar('PN'), dep))
818 dep = d.expand(dep) 821 dep = d.expand(dep)
819 task_deps['parents'][task].append(dep) 822 task_deps['parents'][task].append(dep)
820 823