aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/main.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-09 09:21:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-09 09:53:42 +0000
commit546a662c877b2d3af35e3996950582ed2df41fe4 (patch)
treea15a6c8d8ba048ee71b2df9e286146fd0ffd9041 /lib/bb/main.py
parentb2642e4d5adc765b205e73fee65da679add33ed0 (diff)
downloadbitbake-contrib-546a662c877b2d3af35e3996950582ed2df41fe4.tar.gz
main/runqueue: Rework runall task and add runonly option
The runall commandline option was confusing people. There are in fact two different behaviours people may want. a) For a given target (or set of targets) look through the task graph and run task X only if its present and would have been built. b) For a given target (or set of targets) look through the task graph and run task X if any recipe in the taskgraph has such a target even if it wasn't in the original task graph. I've decided to interpret the existing "runall" option as b), even if right now if behaves like a). For a), which is a valid use case, this patch adds a "runonly" option. With both behaviours present, I'm hoping we can then kill off the "fetchall", "checkuriall" and other tasks from OE metadata and replace them with this option. This would significantly speed up task graph processing. (Deleting the checkuriall and fetchall tasks takes "bitbake core-image-sato -g" from 22s to 8s). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/main.py')
-rwxr-xr-xlib/bb/main.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bb/main.py b/lib/bb/main.py
index 7711b290d..f4474e410 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -292,8 +292,12 @@ 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="store", dest="runall",
- help="Run the specified task for all build targets and their dependencies.")
+ parser.add_option("", "--runall", action="append", dest="runall",
+ 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",
+ help="Run only the specified task within the taskgraph of the specified targets (and any task dependencies those tasks may have).")
+
options, targets = parser.parse_args(argv)