All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow bitbake commands starting with do_ v2
@ 2015-08-31 20:00 Alex Franco
  2015-08-31 20:16 ` Mark Hatle
  2015-08-31 20:18 ` Martin Jansa
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Franco @ 2015-08-31 20:00 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..834992f 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].replace("do_", "", 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_ v2
  2015-08-31 20:00 [PATCH] Allow bitbake commands starting with do_ v2 Alex Franco
@ 2015-08-31 20:16 ` Mark Hatle
  2015-08-31 20:18 ` Martin Jansa
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Hatle @ 2015-08-31 20:16 UTC (permalink / raw)
  To: Alex Franco, bitbake-devel; +Cc: david.nystrom, clarson

On 8/31/15 3:00 PM, 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..834992f 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].replace("do_", "", 1)
> +

not sure if it's faster and/or more obvious...

target[1] = target[1][3:]

(since we know the first three characters are 'do_' since we did a 'startswith'...)

--Mark

>              self.target_pairs.append((fn, target[1]))
>  
>              if fnid in taskData.failed_fnids:
> 



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

* Re: [PATCH] Allow bitbake commands starting with do_ v2
  2015-08-31 20:00 [PATCH] Allow bitbake commands starting with do_ v2 Alex Franco
  2015-08-31 20:16 ` Mark Hatle
@ 2015-08-31 20:18 ` Martin Jansa
  1 sibling, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2015-08-31 20:18 UTC (permalink / raw)
  To: Alex Franco; +Cc: david.nystrom, clarson, bitbake-devel

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

On Mon, Aug 31, 2015 at 03:00:32PM -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]

"v2" belongs to [PATCHv2] (set by subject-prefix), you don't want it to be part of final commit
message, do you?

> 
> 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..834992f 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].replace("do_", "", 1)
> +
>              self.target_pairs.append((fn, target[1]))
>  
>              if fnid in taskData.failed_fnids:
> -- 
> 2.5.1
> 
> -- 
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

end of thread, other threads:[~2015-08-31 20:18 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:00 [PATCH] Allow bitbake commands starting with do_ v2 Alex Franco
2015-08-31 20:16 ` Mark Hatle
2015-08-31 20:18 ` Martin Jansa

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.