diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-16 12:57:02 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-25 22:30:19 +0000 |
commit | e39dbd72ef44eebae32f9fe3b75a1bf789605558 (patch) | |
tree | 8e53fae3efd9a35cc91ad677b0e54cb94e33feac | |
parent | 238a936f60cbffb73f7b370b867e45f91925951c (diff) | |
download | bitbake-contrib-e39dbd72ef44eebae32f9fe3b75a1bf789605558.tar.gz |
runqueue: Fix dependency loop analysis 'hangs'
Currently the mechanism for breaking out of the dependnecy loop analysis
code is broken and doesn't work leading to bitbake appearing to hang.
Add in a custom exception for this purpose and fix the code to exit
as intended, fixing the hang and making the dependency loop code
usable again.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/runqueue.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 4d5d87679..843e46826 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -405,6 +405,9 @@ class RunQueueData: explored_deps = {} msgs = [] + class TooManyLoops(Exception): + pass + def chain_reorder(chain): """ Reorder a dependency chain so the lowest task id is first @@ -457,7 +460,7 @@ class RunQueueData: msgs.append("\n") if len(valid_chains) > 10: msgs.append("Aborted dependency loops search after 10 matches.\n") - return msgs + raise TooManyLoops continue scan = False if revdep not in explored_deps: @@ -476,8 +479,11 @@ class RunQueueData: explored_deps[tid] = total_deps - for task in tasks: - find_chains(task, []) + try: + for task in tasks: + find_chains(task, []) + except TooManyLoops: + pass return msgs |