From e236735d4520fc25a615ed92097fb04ed19f85ba Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Mon, 29 Apr 2019 16:11:59 +0800 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/build.py | 3 +++ 1 file changed, 3 insertions(+) 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): 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) -- cgit v1.2.3-54-g00ecf