* [PATCH 0/3] devtool extract/modify fixes
@ 2017-04-13 12:28 Paul Eggleton
2017-04-13 12:28 ` [PATCH 1/3] devtool: modify: add --keep-temp option for debugging Paul Eggleton
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Paul Eggleton @ 2017-04-13 12:28 UTC (permalink / raw)
To: openembedded-core
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(-)
--
2.9.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] devtool: modify: add --keep-temp option for debugging
2017-04-13 12:28 [PATCH 0/3] devtool extract/modify fixes Paul Eggleton
@ 2017-04-13 12:28 ` Paul Eggleton
2017-04-13 12:28 ` [PATCH 2/3] devtool: extract: fix handling of failed tasks Paul Eggleton
2017-04-13 12:28 ` [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded Paul Eggleton
2 siblings, 0 replies; 7+ messages in thread
From: Paul Eggleton @ 2017-04-13 12:28 UTC (permalink / raw)
To: openembedded-core
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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
scripts/lib/devtool/standard.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 1e84ae4..34525b4 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -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',
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] devtool: extract: fix handling of failed tasks
2017-04-13 12:28 [PATCH 0/3] devtool extract/modify fixes Paul Eggleton
2017-04-13 12:28 ` [PATCH 1/3] devtool: modify: add --keep-temp option for debugging Paul Eggleton
@ 2017-04-13 12:28 ` Paul Eggleton
2017-04-13 12:28 ` [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded Paul Eggleton
2 siblings, 0 replies; 7+ messages in thread
From: Paul Eggleton @ 2017-04-13 12:28 UTC (permalink / raw)
To: openembedded-core
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>
---
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):
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded
2017-04-13 12:28 [PATCH 0/3] devtool extract/modify fixes Paul Eggleton
2017-04-13 12:28 ` [PATCH 1/3] devtool: modify: add --keep-temp option for debugging Paul Eggleton
2017-04-13 12:28 ` [PATCH 2/3] devtool: extract: fix handling of failed tasks Paul Eggleton
@ 2017-04-13 12:28 ` Paul Eggleton
2017-04-13 12:35 ` Peter Kjellerstedt
2017-04-13 12:50 ` [PATCH v2 3/3] devtool: extract: drop erroneous bb.event.TaskStarted Paul Eggleton
2 siblings, 2 replies; 7+ messages in thread
From: Paul Eggleton @ 2017-04-13 12:28 UTC (permalink / raw)
To: openembedded-core
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 <paul.eggleton@linux.intel.com>
---
scripts/lib/devtool/standard.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index c3b65fb..5ff1e23 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -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',
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded
2017-04-13 12:28 ` [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded Paul Eggleton
@ 2017-04-13 12:35 ` Peter Kjellerstedt
2017-04-13 12:52 ` Paul Eggleton
2017-04-13 12:50 ` [PATCH v2 3/3] devtool: extract: drop erroneous bb.event.TaskStarted Paul Eggleton
1 sibling, 1 reply; 7+ messages in thread
From: Peter Kjellerstedt @ 2017-04-13 12:35 UTC (permalink / raw)
To: Paul Eggleton; +Cc: openembedded-core
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Paul Eggleton
> Sent: den 13 april 2017 14:28
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 3/3] devtool: extract: drop erroneous
> bb.event.TaskSucceeded
Correct "bb.event.TaskSucceeded" to "bb.event.TaskStarted" in the subject.
> 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 <paul.eggleton@linux.intel.com>
> ---
> scripts/lib/devtool/standard.py | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/scripts/lib/devtool/standard.py
> b/scripts/lib/devtool/standard.py
> index c3b65fb..5ff1e23 100644
> --- a/scripts/lib/devtool/standard.py
> +++ b/scripts/lib/devtool/standard.py
> @@ -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',
> --
> 2.9.3
//Peter
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 3/3] devtool: extract: drop erroneous bb.event.TaskStarted
2017-04-13 12:28 ` [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded Paul Eggleton
2017-04-13 12:35 ` Peter Kjellerstedt
@ 2017-04-13 12:50 ` Paul Eggleton
1 sibling, 0 replies; 7+ messages in thread
From: Paul Eggleton @ 2017-04-13 12:50 UTC (permalink / raw)
To: openembedded-core
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 <paul.eggleton@linux.intel.com>
---
scripts/lib/devtool/standard.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index c3b65fb..5ff1e23 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -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',
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded
2017-04-13 12:35 ` Peter Kjellerstedt
@ 2017-04-13 12:52 ` Paul Eggleton
0 siblings, 0 replies; 7+ messages in thread
From: Paul Eggleton @ 2017-04-13 12:52 UTC (permalink / raw)
To: Peter Kjellerstedt; +Cc: openembedded-core
Hi Peter,
Oops, well spotted - have fixed the branch and sent a v2.
Thanks,
Paul
On Friday, 14 April 2017 12:35:29 AM NZST Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> > Paul Eggleton
> > Sent: den 13 april 2017 14:28
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH 3/3] devtool: extract: drop erroneous
> > bb.event.TaskSucceeded
>
> Correct "bb.event.TaskSucceeded" to "bb.event.TaskStarted" in the subject.
>
> > 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 <paul.eggleton@linux.intel.com>
> > ---
> >
> > scripts/lib/devtool/standard.py | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/scripts/lib/devtool/standard.py
> > b/scripts/lib/devtool/standard.py
> > index c3b65fb..5ff1e23 100644
> > --- a/scripts/lib/devtool/standard.py
> > +++ b/scripts/lib/devtool/standard.py
> > @@ -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',
> >
> > --
> > 2.9.3
>
> //Peter
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-04-13 12:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13 12:28 [PATCH 0/3] devtool extract/modify fixes Paul Eggleton
2017-04-13 12:28 ` [PATCH 1/3] devtool: modify: add --keep-temp option for debugging Paul Eggleton
2017-04-13 12:28 ` [PATCH 2/3] devtool: extract: fix handling of failed tasks Paul Eggleton
2017-04-13 12:28 ` [PATCH 3/3] devtool: extract: drop erroneous bb.event.TaskSucceeded Paul Eggleton
2017-04-13 12:35 ` Peter Kjellerstedt
2017-04-13 12:52 ` Paul Eggleton
2017-04-13 12:50 ` [PATCH v2 3/3] devtool: extract: drop erroneous bb.event.TaskStarted Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.