From 6fa3fecb129d31fa005c071bdd727aa687967937 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 15 Oct 2015 11:37:40 +0300 Subject: bitbake: 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 :do_. Consider default task (do_build or specified by -c command line option) when normalizing. (Bitbake rev: 0b0e214e6f53c97ad3d48f622c7fc0ca149956f6) Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index a0d7d59eaa..a416d2efe1 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/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 :do_ + 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: -- cgit v1.2.3-54-g00ecf