[oe-commits] [openembedded-core] 06/14: devtool: extract: fix handling of failed tasks
git at git.openembedded.org
git at git.openembedded.org
Thu Apr 13 22:58:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 9174b845bf6a6be7753bf6b921959b1f3f2dcbc0
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Fri Apr 14 00:28:05 2017 +1200
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.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/lib/devtool/standard.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 34525b4..c3b65fb 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):
'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):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list