[bitbake-devel,08/13] bitbake: cooker: use prepareTreeData when computing environment

Submitted by Alexandru DAMIAN on Sept. 9, 2013, 4:40 p.m.

Details

Message ID b02f956283eae290969724ae4502e7db1b8bf073.1378743829.git.alexandru.damian@intel.com
State New
Headers show

Commit Message

Alexandru DAMIAN Sept. 9, 2013, 4:40 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

Eliminate code duplication when building the task data
and run list environment, using the prepareTreeData function
that is used elsewhere.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 bitbake/lib/bb/cooker.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 383c9c4..1eb1768 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -348,13 +348,7 @@  class BBCooker:
             if pkgs_to_build[0] in set(ignore.split()):
                 bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0])
 
-            localdata = data.createCopy(self.data)
-            bb.data.update_data(localdata)
-            bb.data.expandKeys(localdata)
-
-            taskdata = bb.taskdata.TaskData(self.configuration.abort)
-            taskdata.add_provider(localdata, self.recipecache, pkgs_to_build[0])
-            taskdata.add_unresolved(localdata, self.recipecache)
+            runlist, taskdata = self.prepareTreeData(pkgs_to_build, None)
 
             targetid = taskdata.getbuild_id(pkgs_to_build[0])
             fnid = taskdata.build_targets[targetid][0]