diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-10 14:47:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-02 09:55:51 +0100 |
commit | cbcdc1e02ed5418a06fa39adf2ea4353253b7079 (patch) | |
tree | bbe6afff42774207ee20c8d7b646a72c593950e7 /bitbake/lib/bb | |
parent | 4de265915c0a82408778a66179df1ca95568d238 (diff) | |
download | poky-cbcdc1e02ed5418a06fa39adf2ea4353253b7079.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: f613d8d601be75e624e46cfe2351d1a067a9c341)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 339d4d6be515a71311b81fb9e99742af0d8a5130)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-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 6e9c064e9d..17c70d0a61 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -905,6 +905,8 @@ def tasksbetween(task_start, task_end, d): | |||
905 | def follow_chain(task, endtask, chain=None): | 905 | def follow_chain(task, endtask, chain=None): |
906 | if not chain: | 906 | if not chain: |
907 | chain = [] | 907 | chain = [] |
908 | if task in chain: | ||
909 | bb.fatal("Circular task dependencies as %s depends on itself via the chain %s" % (task, " -> ".join(chain))) | ||
908 | chain.append(task) | 910 | chain.append(task) |
909 | for othertask in tasks: | 911 | for othertask in tasks: |
910 | if othertask == task: | 912 | if othertask == task: |