summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/devtool/standard.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 22a9ec82c9..ec192238ed 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -498,18 +498,24 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil):
498 'logging.LogRecord', 498 'logging.LogRecord',
499 'bb.command.CommandCompleted', 499 'bb.command.CommandCompleted',
500 'bb.command.CommandFailed', 500 'bb.command.CommandFailed',
501 'bb.cooker.CookerExit',
501 'bb.build.TaskStarted', 502 'bb.build.TaskStarted',
502 'bb.build.TaskSucceeded', 503 'bb.build.TaskSucceeded',
503 'bb.build.TaskFailed', 504 'bb.build.TaskFailed',
504 'bb.build.TaskFailedSilent']) 505 'bb.build.TaskFailedSilent'])
505 506
506 def runtask(target, task): 507 def runtask(target, task):
508 error = False
507 if tinfoil.build_file(target, task): 509 if tinfoil.build_file(target, task):
508 while True: 510 while True:
509 event = tinfoil.wait_event(0.25) 511 event = tinfoil.wait_event(0.25)
510 if event: 512 if event:
511 if isinstance(event, bb.command.CommandCompleted): 513 if isinstance(event, bb.command.CommandCompleted):
512 break 514 break
515 elif isinstance(event, bb.cooker.CookerExit):
516 # The server is going away, so drop the connection
517 tinfoil.server_connection = None
518 break
513 elif isinstance(event, bb.command.CommandFailed): 519 elif isinstance(event, bb.command.CommandFailed):
514 raise DevtoolError('Task do_%s failed: %s' % (task, event.error)) 520 raise DevtoolError('Task do_%s failed: %s' % (task, event.error))
515 elif isinstance(event, bb.build.TaskFailed): 521 elif isinstance(event, bb.build.TaskFailed):
@@ -519,7 +525,11 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil):
519 elif isinstance(event, logging.LogRecord): 525 elif isinstance(event, logging.LogRecord):
520 if event.levelno <= logging.INFO: 526 if event.levelno <= logging.INFO:
521 continue 527 continue
528 if event.levelno >= logging.ERROR:
529 error = True
522 logger.handle(event) 530 logger.handle(event)
531 if error:
532 raise DevtoolError('An error occurred during do_%s, exiting' % task)
523 533
524 # we need virtual:native:/path/to/recipe if it's a BBCLASSEXTEND 534 # we need virtual:native:/path/to/recipe if it's a BBCLASSEXTEND
525 fn = tinfoil.get_recipe_file(pn) 535 fn = tinfoil.get_recipe_file(pn)