All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 0/1] Allow bitbake commands starting with do_
@ 2015-08-31 20:56 Alex Franco
  2015-08-31 20:56 ` [PATCHv3 1/1] " Alex Franco
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Franco @ 2015-08-31 20:56 UTC (permalink / raw)
  To: bitbake-devel; +Cc: david.nystrom, clarson

The output of "bitbake, -c listtasks pkg" lists tasks with their real names
(starting with "do_"), but then "bitbake -c do_task" fails, as "do_" always
gets unconditionally prepended to task names. This patch handles this error
by always removing "do_" from the beginning of task names when the runqueue
is being constructed.

[YOCTO #7818]

Changes since v1: removed regex, using string.replace
Changes since v2: removed string.replace, using slice

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>

Alex Franco (1):
  Allow bitbake commands starting with do_

 bitbake/lib/bb/runqueue.py | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.5.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCHv3 1/1] Allow bitbake commands starting with do_
  2015-08-31 20:56 [PATCHv3 0/1] Allow bitbake commands starting with do_ Alex Franco
@ 2015-08-31 20:56 ` Alex Franco
  2015-09-01 21:44   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Franco @ 2015-08-31 20:56 UTC (permalink / raw)
  To: bitbake-devel; +Cc: david.nystrom, clarson

The output of "bitbake, -c listtasks pkg" lists tasks with their real names
(starting with "do_"), but then "bitbake -c do_task" fails, as "do_" always
gets unconditionally prepended to task names. This patch handles this error
by always removing "do_" from the beginning of task names when the runqueue
is being constructed.

[YOCTO #7818]

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
---
 bitbake/lib/bb/runqueue.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 0f99e5a..7b25e31 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -634,6 +634,10 @@ class RunQueueData:
 
             fnid = taskData.build_targets[targetid][0]
             fn = taskData.fn_index[fnid]
+
+            if target[1].startswith("do_"):
+                target[1] = target[1][3:]
+
             self.target_pairs.append((fn, target[1]))
 
             if fnid in taskData.failed_fnids:
-- 
2.5.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCHv3 1/1] Allow bitbake commands starting with do_
  2015-08-31 20:56 ` [PATCHv3 1/1] " Alex Franco
@ 2015-09-01 21:44   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2015-09-01 21:44 UTC (permalink / raw)
  To: Alex Franco; +Cc: david.nystrom, clarson, bitbake-devel

On Mon, 2015-08-31 at 15:56 -0500, Alex Franco wrote:
> The output of "bitbake, -c listtasks pkg" lists tasks with their real names
> (starting with "do_"), but then "bitbake -c do_task" fails, as "do_" always
> gets unconditionally prepended to task names. This patch handles this error
> by always removing "do_" from the beginning of task names when the runqueue
> is being constructed.
> 
> [YOCTO #7818]
> 
> Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
> ---
>  bitbake/lib/bb/runqueue.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
> index 0f99e5a..7b25e31 100644
> --- a/bitbake/lib/bb/runqueue.py
> +++ b/bitbake/lib/bb/runqueue.py
> @@ -634,6 +634,10 @@ class RunQueueData:
>  
>              fnid = taskData.build_targets[targetid][0]
>              fn = taskData.fn_index[fnid]
> +
> +            if target[1].startswith("do_"):
> +                target[1] = target[1][3:]
> +
>              self.target_pairs.append((fn, target[1]))
>  
>              if fnid in taskData.failed_fnids:

I tried this on the autobuilder and we saw cascades of failures, e.g:

https://autobuilder.yoctoproject.org/main/builders/build-appliance/builds/468/steps/BuildImages/logs/stdio 

so clearly we need more thought on this. I prefer the .startswith over
the regex as in general its much faster code than loading the re engine.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-01 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31 20:56 [PATCHv3 0/1] Allow bitbake commands starting with do_ Alex Franco
2015-08-31 20:56 ` [PATCHv3 1/1] " Alex Franco
2015-09-01 21:44   ` Richard Purdie

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.