summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-16 12:57:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-17 10:20:21 +0000
commit8dac3ce4247bca443c96b0ecec5d1431c325aeb8 (patch)
tree5607beba1fb37d5bc17c3c314241f8ef14751f71 /bitbake
parent30c21f4a6f64d0589f02ee315a46d73da4b89167 (diff)
downloadpoky-8dac3ce4247bca443c96b0ecec5d1431c325aeb8.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 80ae8a2a46..71f178de4f 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -410,6 +410,9 @@ class RunQueueData:
410 explored_deps = {} 410 explored_deps = {}
411 msgs = [] 411 msgs = []
412 412
413 class TooManyLoops(Exception):
414 pass
415
413 def chain_reorder(chain): 416 def chain_reorder(chain):
414 """ 417 """
415 Reorder a dependency chain so the lowest task id is first 418 Reorder a dependency chain so the lowest task id is first
@@ -462,7 +465,7 @@ class RunQueueData:
462 msgs.append("\n") 465 msgs.append("\n")
463 if len(valid_chains) > 10: 466 if len(valid_chains) > 10:
464 msgs.append("Aborted dependency loops search after 10 matches.\n") 467 msgs.append("Aborted dependency loops search after 10 matches.\n")
465 return msgs 468 raise TooManyLoops
466 continue 469 continue
467 scan = False 470 scan = False
468 if revdep not in explored_deps: 471 if revdep not in explored_deps:
@@ -481,8 +484,11 @@ class RunQueueData:
481 484
482 explored_deps[tid] = total_deps 485 explored_deps[tid] = total_deps
483 486
484 for task in tasks: 487 try:
485 find_chains(task, []) 488 for task in tasks:
489 find_chains(task, [])
490 except TooManyLoops:
491 pass
486 492
487 return msgs 493 return msgs
488 494