diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-04-14 00:18:27 +1200 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-04-14 00:26:46 +1200 |
commit | 0a1164ab1a1cb70e38d6211f71f446353de630dd (patch) | |
tree | e4619a0475c1fef1e93666e6aff1f1e2bc4302c5 /scripts/lib/devtool/standard.py | |
parent | 3003597a57f08ebc6bdf443a405734f5dd33f280 (diff) | |
download | openembedded-core-contrib-0a1164ab1a1cb70e38d6211f71f446353de630dd.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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r-- | scripts/lib/devtool/standard.py | 3 |
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): '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): |