mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 09:49:33 +02:00
bitbake: 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. (Bitbake rev: 8756e4ade67c16e35269ea0659e10b9ebaa6117f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -410,6 +410,9 @@ class RunQueueData:
|
|||||||
explored_deps = {}
|
explored_deps = {}
|
||||||
msgs = []
|
msgs = []
|
||||||
|
|
||||||
|
class TooManyLoops(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
def chain_reorder(chain):
|
def chain_reorder(chain):
|
||||||
"""
|
"""
|
||||||
Reorder a dependency chain so the lowest task id is first
|
Reorder a dependency chain so the lowest task id is first
|
||||||
@@ -462,7 +465,7 @@ class RunQueueData:
|
|||||||
msgs.append("\n")
|
msgs.append("\n")
|
||||||
if len(valid_chains) > 10:
|
if len(valid_chains) > 10:
|
||||||
msgs.append("Aborted dependency loops search after 10 matches.\n")
|
msgs.append("Aborted dependency loops search after 10 matches.\n")
|
||||||
return msgs
|
raise TooManyLoops
|
||||||
continue
|
continue
|
||||||
scan = False
|
scan = False
|
||||||
if revdep not in explored_deps:
|
if revdep not in explored_deps:
|
||||||
@@ -481,8 +484,11 @@ class RunQueueData:
|
|||||||
|
|
||||||
explored_deps[tid] = total_deps
|
explored_deps[tid] = total_deps
|
||||||
|
|
||||||
for task in tasks:
|
try:
|
||||||
find_chains(task, [])
|
for task in tasks:
|
||||||
|
find_chains(task, [])
|
||||||
|
except TooManyLoops:
|
||||||
|
pass
|
||||||
|
|
||||||
return msgs
|
return msgs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user