Skip to contentSkip to conversation

build.py: Don't return dependencies for tasks which don't exist

PATCH New Richard Purdie 1 participant 1 message Dec 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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).

---
 lib/bb/build.py | 6 ++++++
 1 file changed, 6 insertions(+)
lib/bb/build.py +6 -0
index 0d0100a..4631abd 100644
@@ -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')
Signature · 1 line
2.7.4