aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-10 14:47:37 +0100
committerSteve Sakoman <steve@sakoman.com>2021-09-24 12:38:18 -1000
commitf613d8d601be75e624e46cfe2351d1a067a9c341 (patch)
tree757889b2c7b999a8b9be7752fdcd39f6b1b37447
parent53d05a7b4a6380bd2bf8dd7bb0681e8c961bed5d (diff)
downloadbitbake-f613d8d601be75e624e46cfe2351d1a067a9c341.tar.gz
build: Catch and error upon circular task references
If there are circular task references, error on them rather than show a recursion error. A simple reproducer is: """ do_packageswu () { : } addtask do_packageswu after do_image_complete before do_image_qa """ into image_types.bbclass. There is code in runqueue to detect these but we never get that far with the current codebase. [YOCTO #13140] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 339d4d6be515a71311b81fb9e99742af0d8a5130) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--lib/bb/build.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 6e9c064e9..17c70d0a6 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -905,6 +905,8 @@ def tasksbetween(task_start, task_end, d):
def follow_chain(task, endtask, chain=None):
if not chain:
chain = []
+ if task in chain:
+ bb.fatal("Circular task dependencies as %s depends on itself via the chain %s" % (task, " -> ".join(chain)))
chain.append(task)
for othertask in tasks:
if othertask == task: