[bitbake-devel] [PATCH] use the word "task" as the argument for --runall and --runonly
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Sat May 4 23:18:05 UTC 2019
> -----Original Message-----
> From: bitbake-devel-bounces at lists.openembedded.org <bitbake-devel-
> bounces at lists.openembedded.org> On Behalf Of Robert P. J. Day
> Sent: den 4 maj 2019 23:04
> To: BitBake developer list <bitbake-devel at lists.openembedded.org>
> Subject: [bitbake-devel] [PATCH] use the word "task" as the argument
> for --runall and --runonly
>
> The proper argument for "--runall" and "--runonly" should be "task".
>
> Signed-off-by: Robert P. J. Day <rpjday at crashcourse.ca>
>
> ---
>
> diff --git a/lib/bb/main.py b/lib/bb/main.py
> index 8d1978f9..66ef84c7 100755
> --- a/lib/bb/main.py
> +++ b/lib/bb/main.py
> @@ -280,10 +280,10 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
> help="Writes the event log of the build to a bitbake event json file. "
> "Use '' (empty string) to assign the name automatically.")
>
> - parser.add_option("", "--runall", action="append", dest="runall",
> + parser.add_option("", "--runall", action="append", dest="task",
> help="Run the specified task for any recipe in the taskgraph of the specified target (even if it wouldn't otherwise have run).")
>
> - parser.add_option("", "--runonly", action="append", dest="runonly",
> + parser.add_option("", "--runonly", action="append", dest="task",
> help="Run only the specified task within the taskgraph of the specified targets (and any task dependencies those tasks may have).")
That will not work as it changes the name of the variables used to retrieve the
arguments in the code, e.g., both self.cooker.configuration.runonly and
self.cooker.configuration.runall would become
self.cooker.configuration.task, which obviously doesn't work. What you want to
do instead is add metavar arguments to the add_option() calls. I.e.:
parser.add_option("", "--runall", action="append", dest="runall", metavar="TASK",
help="Run the specified task for any recipe in the taskgraph of the specified target (even if it wouldn't otherwise have run).")
parser.add_option("", "--runonly", action="append", dest="runonly", metavar="TASK",
help="Run only the specified task within the taskgraph of the specified targets (and any task dependencies those tasks may have).")
//Peter
More information about the bitbake-devel
mailing list