All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow bitbake commands starting with do_
@ 2015-08-31 17:21 Alex Franco
  2015-08-31 17:34 ` Christopher Larson
  2015-08-31 23:35 ` Benjamin Esquivel
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Franco @ 2015-08-31 17:21 UTC (permalink / raw)
  To: bitbake-devel

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..4a0f01a 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]
+
+            import re
+            target[1] = re.sub("^do_", "", target[1])
+
             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: [PATCH] Allow bitbake commands starting with do_
  2015-08-31 17:21 [PATCH] Allow bitbake commands starting with do_ Alex Franco
@ 2015-08-31 17:34 ` Christopher Larson
  2015-08-31 23:35 ` Benjamin Esquivel
  1 sibling, 0 replies; 3+ messages in thread
From: Christopher Larson @ 2015-08-31 17:34 UTC (permalink / raw)
  To: Alex Franco; +Cc: bitbake-devel@lists.openembedded.org

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

On Mon, Aug 31, 2015 at 10:21 AM, Alex Franco <
alejandro.franco@linux.intel.com> 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..4a0f01a 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]
> +
> +            import re
> +            target[1] = re.sub("^do_", "", target[1])
> +
>              self.target_pairs.append((fn, target[1]))
>

You don't need to use a regular expression for this. Also, imports belong
at the top of the file anyway.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 2295 bytes --]

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

* Re: [PATCH] Allow bitbake commands starting with do_
  2015-08-31 17:21 [PATCH] Allow bitbake commands starting with do_ Alex Franco
  2015-08-31 17:34 ` Christopher Larson
@ 2015-08-31 23:35 ` Benjamin Esquivel
  1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Esquivel @ 2015-08-31 23:35 UTC (permalink / raw)
  To: Alex Franco, bitbake-devel

I like this version from the 3 you sent today :) See comment below

On Mon, 2015-08-31 at 12:21 -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..4a0f01a 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]
> +
imports at this point sometimes get messy, would be good if it was at
least at the beginning of the function.
> +            import re
> +            target[1] = re.sub("^do_", "", target[1])
> +
>              self.target_pairs.append((fn, target[1]))
>  
>              if fnid in taskData.failed_fnids:


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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31 17:21 [PATCH] Allow bitbake commands starting with do_ Alex Franco
2015-08-31 17:34 ` Christopher Larson
2015-08-31 23:35 ` Benjamin Esquivel

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.