Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH] taskdata: Add a function to return the virtual/ mapping data
@ 2015-09-30 13:28 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2015-09-30 13:28 UTC (permalink / raw)
  To: bitbake-devel

When building an execution task graph, bitbake does resolve virtual/xxx
namespaces into specific providers. This data isn't exported anywhere
however.

This adds a function so that runqueue can at least retrieve this data
which can then be used by the system.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index 5fab704..4d12b33 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -612,6 +612,18 @@ class TaskData:
                 break
         # self.dump_data()
 
+    def get_providermap(self):
+        virts = []
+        virtmap = {}
+
+        for name in self.build_names_index:
+            if name.startswith("virtual/"):
+                virts.append(name)
+        for v in virts:
+            if self.have_build_target(v):
+                virtmap[v] = self.fn_index[self.get_provider(v)[0]]
+        return virtmap
+
     def dump_data(self):
         """
         Dump some debug information on the internal data structures




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-30 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 13:28 [PATCH] taskdata: Add a function to return the virtual/ mapping data Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox