1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

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>
This commit is contained in:
Robert Yang
2019-04-29 16:11:59 +08:00
committed by Richard Purdie
parent 82300691b0
commit e236735d45
+3
View File
@@ -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)