[bitbake-devel] use the word "task" as the argument for --runall and --runonly

Submitted by Robert P. J. Day on May 4, 2019, 9:04 p.m. | Patch ID: 160914

Details

Message ID alpine.LFD.2.21.1905041701580.507@localhost.localdomain
State New
Headers show

Commit Message

Robert P. J. Day May 4, 2019, 9:04 p.m.
The proper argument for "--runall" and "--runonly" should be "task".

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

Patch hide | download patch | download mbox

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).")



Comments

Peter Kjellerstedt May 4, 2019, 11:18 p.m.
> -----Original Message-----
> From: bitbake-devel-bounces@lists.openembedded.org <bitbake-devel-
> bounces@lists.openembedded.org> On Behalf Of Robert P. J. Day
> Sent: den 4 maj 2019 23:04
> To: BitBake developer list <bitbake-devel@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@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