]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: extract: fix handling of failed tasks
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 13 Apr 2017 12:28:05 +0000 (00:28 +1200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 13 Apr 2017 22:57:38 +0000 (23:57 +0100)
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/standard.py

index 34525b495b83990b54ce7fbb662498061b9ede44..c3b65fbbd417ecab9a37c30183ff389005374c57 100644 (file)
@@ -536,6 +536,7 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil):
                                 'bb.command.CommandFailed',
                                 'bb.build.TaskStarted',
                                 'bb.build.TaskSucceeded',
+                                'bb.build.TaskFailed',
                                 'bb.build.TaskFailedSilent'])
 
         def runtask(target, task):
@@ -547,6 +548,8 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil):
                             break
                         elif isinstance(event, bb.command.CommandFailed):
                             raise DevtoolError('Task do_%s failed: %s' % (task, event.error))
+                        elif isinstance(event, bb.build.TaskFailed):
+                            raise DevtoolError('Task do_%s failed' % task)
                         elif isinstance(event, bb.build.TaskStarted):
                             logger.info('Executing %s...' % event._task)
                         elif isinstance(event, logging.LogRecord):