Skip to contentSkip to conversation

use the word "task" as the argument for --runall and --runonly

PATCH In review Robert P. J. Day 2 participants 2 messages May 4, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use the word "task" as the argument for --runall and --runonly

The proper argument for "--runall" and "--runonly" should be "task".

---

lib/bb/main.py +2 -2
index 8d1978f9..66ef84c7 100755
@@ -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).")
 
 
Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                         http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 19 lines

-----Original Message-----
From: [email protected] <bitbake-devel- [email protected]> On Behalf Of Robert P. J. Day
Sent: den 4 maj 2019 23:04
To: BitBake developer list <[email protected]>
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".

---

lib/bb/main.py +0 -0
index 8d1978f9..66ef84c7 100755

lib/bb/main.py class BitBakeConfigParameters(cookerdata.ConfigParameters): · line 287

Quoted 10 lines
lib/bb/main.py +2 -2
@@ -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