summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-04-14 00:28:05 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-14 09:47:08 +0100
commit02c39d3fad81d18cd57a70e9642f07c22909f6e4 (patch)
tree5d1538f2dd38cdb06d832530fb6c9f51984a5bd5 /scripts/lib/devtool/standard.py
parent2338032d0b355dbca09f96318d903ea453a14f5a (diff)
downloadpoky-02c39d3fad81d18cd57a70e9642f07c22909f6e4.tar.gz
devtool: extract: fix handling of failed tasks
If a task such as do_fetch fails when we're extracting source for a recipe (within devtool modify / upgrade / extract / sync) then we should naturally stop processing instead of blundering on; in order to do that we need to be listening for the TaskFailed event. Thanks to Richard Purdie for noticing and fixing this. (From OE-Core rev: 9174b845bf6a6be7753bf6b921959b1f3f2dcbc0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r--scripts/lib/devtool/standard.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 34525b495b..c3b65fbbd4 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -536,6 +536,7 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil):
536 'bb.command.CommandFailed', 536 'bb.command.CommandFailed',
537 'bb.build.TaskStarted', 537 'bb.build.TaskStarted',
538 'bb.build.TaskSucceeded', 538 'bb.build.TaskSucceeded',
539 'bb.build.TaskFailed',
539 'bb.build.TaskFailedSilent']) 540 'bb.build.TaskFailedSilent'])
540 541
541 def runtask(target, task): 542 def runtask(target, task):
@@ -547,6 +548,8 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil):
547 break 548 break
548 elif isinstance(event, bb.command.CommandFailed): 549 elif isinstance(event, bb.command.CommandFailed):
549 raise DevtoolError('Task do_%s failed: %s' % (task, event.error)) 550 raise DevtoolError('Task do_%s failed: %s' % (task, event.error))
551 elif isinstance(event, bb.build.TaskFailed):
552 raise DevtoolError('Task do_%s failed' % task)
550 elif isinstance(event, bb.build.TaskStarted): 553 elif isinstance(event, bb.build.TaskStarted):
551 logger.info('Executing %s...' % event._task) 554 logger.info('Executing %s...' % event._task)
552 elif isinstance(event, logging.LogRecord): 555 elif isinstance(event, logging.LogRecord):