[bitbake-devel] [PATCH] Allow bitbake commands starting with do_

Christopher Larson clarson at kergoth.com
Mon Aug 31 17:34:31 UTC 2015


On Mon, Aug 31, 2015 at 10:21 AM, Alex Franco <
alejandro.franco at 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 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..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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20150831/d7abbddf/attachment-0002.html>


More information about the bitbake-devel mailing list