summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-10 14:47:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-11 22:39:19 +0100
commit3a8cb949a9c11d7fcab55c2036f8be306beb4e37 (patch)
tree04fe3edf37b4865b0176560a45c7639d50e57035 /bitbake/lib/bb/build.py
parent3a737a783cedd128ae8c8b1c4f55642b9a5691ae (diff)
downloadpoky-3a8cb949a9c11d7fcab55c2036f8be306beb4e37.tar.gz
bitbake: 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] (Bitbake rev: 339d4d6be515a71311b81fb9e99742af0d8a5130) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r--bitbake/lib/bb/build.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 1e062adb51..c2479dd167 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -1034,6 +1034,8 @@ def tasksbetween(task_start, task_end, d):
1034 def follow_chain(task, endtask, chain=None): 1034 def follow_chain(task, endtask, chain=None):
1035 if not chain: 1035 if not chain:
1036 chain = [] 1036 chain = []
1037 if task in chain:
1038 bb.fatal("Circular task dependencies as %s depends on itself via the chain %s" % (task, " -> ".join(chain)))
1037 chain.append(task) 1039 chain.append(task)
1038 for othertask in tasks: 1040 for othertask in tasks:
1039 if othertask == task: 1041 if othertask == task: