[oe-commits] [bitbake] 01/03: runqueue: add option to run all tasks in specific build target
git at git.openembedded.org
git at git.openembedded.org
Sat Mar 11 16:18:52 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 7c0fa6ba66cdb956b37d94055307cde857633df9
Author: Matthew McClintock <msm-oss at mcclintock.net>
AuthorDate: Wed Mar 8 14:24:38 2017 -0600
runqueue: add option to run all tasks in specific build target
For example:
$ bitbake core-image-minimal --runall unpack
...
NOTE: Tasks Summary: Attempted 326 tasks of which 88 didn't need to be rerun and all succeeded.
$ bitbake core-image-minimal --runall patch
NOTE: Tasks Summary: Attempted 453 tasks of which 332 didn't need to be rerun and all succeeded.
This can replace fetchall as well:
$ bitbake core-image-minimal --runall fetch
NOTE: Tasks Summary: Attempted 135 tasks of which 119 didn't need to be rerun and all succeeded.
Signed-off-by: Matthew McClintock <msm-oss at mcclintock.net>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/cookerdata.py | 1 +
lib/bb/main.py | 3 +++
lib/bb/runqueue.py | 17 +++++++++++++++++
3 files changed, 21 insertions(+)
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 53f4587..722d860 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -148,6 +148,7 @@ class CookerConfiguration(object):
self.writeeventlog = False
self.server_only = False
self.limited_deps = False
+ self.runall = None
self.env = {}
diff --git a/lib/bb/main.py b/lib/bb/main.py
index 3ff43cf..b3cd2cf 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -287,6 +287,9 @@ 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.")
+
options, targets = parser.parse_args(argv)
if options.quiet and options.verbose:
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index a3b451a..38304d1 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -803,6 +803,23 @@ class RunQueueData:
self.init_progress_reporter.next_stage()
+ if self.cooker.configuration.runall is not None:
+ runall = "do_%s" % self.cooker.configuration.runall
+ runall_tids = { k: v for k, v in self.runtaskentries.items() if taskname_from_tid(k) == runall }
+
+ # re-run the mark_active and then drop unused tasks from new list
+ runq_build = {}
+ for tid in list(runall_tids):
+ mark_active(tid,1)
+
+ for tid in list(self.runtaskentries.keys()):
+ if tid not in runq_build:
+ del self.runtaskentries[tid]
+ delcount += 1
+
+ if len(self.runtaskentries) == 0:
+ bb.msg.fatal("RunQueue", "No remaining tasks to run run for build target %s with runall %s" % (target, runall))
+
#
# Step D - Sanity checks and computation
#
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list