diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-10-15 11:37:40 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-16 14:13:23 +0100 |
commit | 6fa3fecb129d31fa005c071bdd727aa687967937 (patch) | |
tree | e558388cc4f83ebee3948293ae7dc55f42252986 /bitbake/lib/bb/cooker.py | |
parent | 5effe8f63252ee4d28b985a956378690ff37c01c (diff) | |
download | poky-6fa3fecb129d31fa005c071bdd727aa687967937.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 20 |
1 files changed, 19 insertions, 1 deletions
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: | |||
1391 | build.reset_cache() | 1391 | build.reset_cache() |
1392 | self.buildSetVars() | 1392 | self.buildSetVars() |
1393 | 1393 | ||
1394 | # If we are told to do the None task then query the default task | ||
1395 | if (task == None): | ||
1396 | task = self.configuration.cmd | ||
1397 | |||
1398 | if not task.startswith("do_"): | ||
1399 | task = "do_%s" % task | ||
1400 | |||
1394 | taskdata, runlist, fulltargetlist = self.buildTaskData(targets, task, self.configuration.abort) | 1401 | taskdata, runlist, fulltargetlist = self.buildTaskData(targets, task, self.configuration.abort) |
1395 | 1402 | ||
1396 | buildname = self.data.getVar("BUILDNAME", False) | 1403 | buildname = self.data.getVar("BUILDNAME", False) |
1397 | bb.event.fire(bb.event.BuildStarted(buildname, fulltargetlist), self.data) | 1404 | |
1405 | # make targets to always look as <target>:do_<task> | ||
1406 | ntargets = [] | ||
1407 | for target in fulltargetlist: | ||
1408 | if ":" in target: | ||
1409 | if ":do_" not in target: | ||
1410 | target = "%s:do_%s" % tuple(target.split(":", 1)) | ||
1411 | else: | ||
1412 | target = "%s:%s" % (target, task) | ||
1413 | ntargets.append(target) | ||
1414 | |||
1415 | bb.event.fire(bb.event.BuildStarted(buildname, ntargets), self.data) | ||
1398 | 1416 | ||
1399 | rq = bb.runqueue.RunQueue(self, self.data, self.recipecache, taskdata, runlist) | 1417 | rq = bb.runqueue.RunQueue(self, self.data, self.recipecache, taskdata, runlist) |
1400 | if 'universe' in targets: | 1418 | if 'universe' in targets: |