[bitbake-devel] [PATCH] build.py: Don't return dependencies for tasks which don't exist

Richard Purdie richard.purdie at linuxfoundation.org
Tue Dec 19 12:47:20 UTC 2017


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 <richard.purdie at linuxfoundation.org>
---
 lib/bb/build.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/bb/build.py b/lib/bb/build.py
index 0d0100a..4631abd 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')
-- 
2.7.4




More information about the bitbake-devel mailing list