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 <target>:do_<task>.
Consider default task (do_build or specified by -c command
line option) when normalizing.

(Bitbake rev: 0b0e214e6f53c97ad3d48f622c7fc0ca149956f6)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh 2015-10-15 11:37:40 +03:00 committed by Richard Purdie
parent 5effe8f632
commit 6fa3fecb12
1 changed files with 19 additions and 1 deletions

View File

@ -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: