diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-16 07:19:38 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-16 22:17:48 +0100 |
commit | 5dad70fedb5fc38dbbd498d668b95ea9dba48293 (patch) | |
tree | bf92826379308be8efe0dbf456ac7425e04b9114 /bitbake/lib | |
parent | 4de5c296dbdbf161ffcd3cd4671930e770fe740d (diff) | |
download | poky-5dad70fedb5fc38dbbd498d668b95ea9dba48293.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: 4d83d9103d9225a2ac42c0f3dfada2f5cf140b68)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 339d4d6be515a71311b81fb9e99742af0d8a5130)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/build.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index b2715fc530..24ce327c5a 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -1025,6 +1025,8 @@ def tasksbetween(task_start, task_end, d): | |||
1025 | def follow_chain(task, endtask, chain=None): | 1025 | def follow_chain(task, endtask, chain=None): |
1026 | if not chain: | 1026 | if not chain: |
1027 | chain = [] | 1027 | chain = [] |
1028 | if task in chain: | ||
1029 | bb.fatal("Circular task dependencies as %s depends on itself via the chain %s" % (task, " -> ".join(chain))) | ||
1028 | chain.append(task) | 1030 | chain.append(task) |
1029 | for othertask in tasks: | 1031 | for othertask in tasks: |
1030 | if othertask == task: | 1032 | if othertask == task: |