[bitbake-devel] [PATCH] Allow bitbake commands starting with do_ v2
Mark Hatle
mark.hatle at windriver.com
Mon Aug 31 20:16:46 UTC 2015
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 at 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:
>
More information about the bitbake-devel
mailing list