From b7a81cb91e82ba64b63c9153dc161a2ab4696715 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 19 Dec 2017 12:38:20 +0000 Subject: 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). Signed-off-by: Richard Purdie --- lib/bb/build.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/bb/build.py b/lib/bb/build.py index 0d0100a06..4631abdde 100644 --- a/lib/bb/build.py +++ b/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') -- cgit 1.2.3-korg