]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
taskdata: Add a function to return the virtual/ mapping data
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Sep 2015 13:28:21 +0000 (14:28 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Sep 2015 13:59:18 +0000 (14:59 +0100)
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>
lib/bb/taskdata.py

index 5fab7043ccf7b0f950cbb59839c1939c0ccbce23..4d12b3325bfa868649a01628fe6e115403b2e847 100644 (file)
@@ -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