devtool extract/modify fixes
cover devtool extract/modify fixes
The following changes since commit 334020a800434d20e7c3312890a2baca295c41c7:
oe-run-native: explicitly use bash (2017-04-13 10:52:54 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/devtool26
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/devtool26
Paul Eggleton (3):
devtool: modify: add --keep-temp option for debugging
devtool: extract: fix handling of failed tasks
devtool: extract: drop erroneous bb.event.TaskSucceeded
scripts/lib/devtool/standard.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.9.3
PATCH 1/3 devtool: modify: add --keep-temp option for debugging
Most of the other extract-based commands have this option but oddly I left it out for modify - I guess because if I was debugging an issue here I just used devtool extract to do so, but there's no reason why we can't have it here and it is useful.
--- scripts/lib/devtool/standard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/lib/devtool/standard.py +2 -1
@@ -791,7 +791,7 @@ def modify(args, config, basepath, workspace): initial_rev = None commits = [] if not args.no_extract: - initial_rev = _extract_source(srctree, False, args.branch, False, rd, tinfoil) + initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, rd, tinfoil) if not initial_rev: return 1 logger.info('Source tree extracted to %s' % srctree)
@@ -1851,6 +1851,7 @@ def register_commands(subparsers, context): group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true") group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true") parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (when not using -n/--no-extract) (default "%(default)s")') + parser_modify.add_argument('--keep-temp', help='Keep temporary directory (for debugging)', action="store_true") parser_modify.set_defaults(func=modify) parser_extract = subparsers.add_parser('extract', help='Extract the source for an existing recipe',
Signature · 1 line
2.9.3
PATCH 2/3 devtool: extract: fix handling of failed tasks
In reply to Paul EggletonIf 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.
--- scripts/lib/devtool/standard.py | 3 +++ 1 file changed, 3 insertions(+)
scripts/lib/devtool/standard.py +3 -0
@@ -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):
Signature · 1 line
2.9.3
PATCH 3/3 devtool: extract: drop erroneous bb.event.TaskSucceeded
In reply to Paul EggletonThis is a non-existent event - we already have the actual bb.build.TaskSucceeded further down in the list hence why it wasn't noticed earlier.
--- scripts/lib/devtool/standard.py | 1 - 1 file changed, 1 deletion(-)
scripts/lib/devtool/standard.py +0 -1
@@ -530,7 +530,6 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil): tinfoil.set_event_mask(['bb.event.BuildStarted', 'bb.event.BuildCompleted', - 'bb.event.TaskStarted', 'logging.LogRecord', 'bb.command.CommandCompleted', 'bb.command.CommandFailed',
Signature · 1 line
2.9.3
Re: [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded
Quoted 8 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Paul Eggleton
Sent: den 13 april 2017 14:28
To: [email protected]
Subject: [OE-core] [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded
Correct "bb.event.TaskSucceeded" to "bb.event.TaskStarted" in the subject.
Quoted 17 lines
This is a non-existent event - we already have the actual bb.build.TaskSucceeded further down in the list hence why it wasn't noticed earlier.
Signed-off-by Paul Eggleton <[email protected]>--- scripts/lib/devtool/standard.py | 1 - 1 file changed, 1 deletion(-)scripts/lib/devtool/standard.py +0
-0@@ -530,7 +530,6 @@ def _extract_source(srctree, keep_temp, devbranch,sync, d, tinfoil):
Quoted 8 lines
tinfoil.set_event_mask(['bb.event.BuildStarted',
'bb.event.BuildCompleted',
- 'bb.event.TaskStarted',
'logging.LogRecord', 'bb.command.CommandCompleted', 'bb.command.CommandFailed',
--
2.9.3
//Peter
PATCH v2 3/3 devtool: extract: drop erroneous bb.event.TaskStarted
In reply to Paul EggletonThis is a non-existent event - we already have the actual bb.build.TaskSucceeded further down in the list hence why it wasn't noticed earlier.
--- scripts/lib/devtool/standard.py | 1 - 1 file changed, 1 deletion(-)
scripts/lib/devtool/standard.py +0 -1
@@ -530,7 +530,6 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil): tinfoil.set_event_mask(['bb.event.BuildStarted', 'bb.event.BuildCompleted', - 'bb.event.TaskStarted', 'logging.LogRecord', 'bb.command.CommandCompleted', 'bb.command.CommandFailed',
Signature · 1 line
2.9.3
Re: [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded
In reply to Peter KjellerstedtHi Peter,
Oops, well spotted - have fixed the branch and sent a v2.
Thanks,
Paul
Quoted 43 lines · NZST Peter Kjellerstedt
Quoted 8 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Paul Eggleton
Sent: den 13 april 2017 14:28
To: [email protected]
Subject: [OE-core] [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceededCorrect "bb.event.TaskSucceeded" to "bb.event.TaskStarted" in the subject.
Quoted 22 lines
This is a non-existent event - we already have the actual bb.build.TaskSucceeded further down in the list hence why it wasn't noticed earlier.
Signed-off-by Paul Eggleton <[email protected]>---
scripts/lib/devtool/standard.py | 1 - 1 file changed, 1 deletion(-)scripts/lib/devtool/standard.py +0
-0@@ -530,7 +530,6 @@ def _extract_source(srctree, keep_temp, devbranch,sync, d, tinfoil):
tinfoil.set_event_mask(['bb.event.BuildStarted','bb.event.BuildCompleted',
Quoted 8 lines
- 'bb.event.TaskStarted',
'logging.LogRecord', 'bb.command.CommandCompleted', 'bb.command.CommandFailed',
--
2.9.3//Peter
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre