[bitbake-devel] [PATCH 2/8] cooker: add providermap to dep_tree

Elliot Smith elliot.smith at intel.com
Fri Jan 8 11:17:16 UTC 2016


From: Ed Bartosh <ed.bartosh at linux.intel.com>

Added providermap information to the result of buildDependTree API.

This will be used by Toaster to map virtual dependencies to recipes.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 lib/bb/cooker.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index edceca0..e957169 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -725,8 +725,15 @@ class BBCooker:
         depend_tree["packages"] = {}
         depend_tree["rdepends-pkg"] = {}
         depend_tree["rrecs-pkg"] = {}
+        depend_tree['providermap'] = {}
         depend_tree["layer-priorities"] = self.recipecache.bbfile_config_priorities
 
+        for name, fn in taskdata.get_providermap().iteritems():
+            pn = self.recipecache.pkg_fn[fn]
+            if name != pn:
+                version = "%s:%s-%s" % self.recipecache.pkg_pepvpr[fn]
+                depend_tree['providermap'][name] = (pn, version)
+
         for task in xrange(len(rq.rqdata.runq_fnid)):
             taskname = rq.rqdata.runq_task[task]
             fnid = rq.rqdata.runq_fnid[task]
-- 
1.9.3

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the bitbake-devel mailing list