summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-10-15 11:37:40 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-16 14:08:34 +0100
commit0b0e214e6f53c97ad3d48f622c7fc0ca149956f6 (patch)
tree7c6463cf7c64e59f6147cc383bc27e74e7e13bbc
parentf44b34833f164daf34c57703429ed8f122888037 (diff)
downloadbitbake-0b0e214e6f53c97ad3d48f622c7fc0ca149956f6.tar.gz
cooker: normalize build targets
BuildStarted event not fully represents build tasks for the targets. If -c option is used to specify default task it's not included into the event. Made build targets to always look as <target>:do_<task>. Consider default task (do_build or specified by -c command line option) when normalizing. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cooker.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index a0d7d59ea..a416d2efe 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1391,10 +1391,28 @@ class BBCooker:
build.reset_cache()
self.buildSetVars()
+ # If we are told to do the None task then query the default task
+ if (task == None):
+ task = self.configuration.cmd
+
+ if not task.startswith("do_"):
+ task = "do_%s" % task
+
taskdata, runlist, fulltargetlist = self.buildTaskData(targets, task, self.configuration.abort)
buildname = self.data.getVar("BUILDNAME", False)
- bb.event.fire(bb.event.BuildStarted(buildname, fulltargetlist), self.data)
+
+ # make targets to always look as <target>:do_<task>
+ ntargets = []
+ for target in fulltargetlist:
+ if ":" in target:
+ if ":do_" not in target:
+ target = "%s:do_%s" % tuple(target.split(":", 1))
+ else:
+ target = "%s:%s" % (target, task)
+ ntargets.append(target)
+
+ bb.event.fire(bb.event.BuildStarted(buildname, ntargets), self.data)
rq = bb.runqueue.RunQueue(self, self.data, self.recipecache, taskdata, runlist)
if 'universe' in targets: