[Toaster] [PATCH] toaster: resolve missing 'native[sdk]:' prefixes

Reyna, David david.reyna at windriver.com
Fri Jan 20 13:18:02 PST 2017


Some task events are missing the 'virtual:native[sdk]:' prefixes.
The Toaster has code to help match missing prefixes, but needs
additional help resolving between 'native:' and 'nativesdk:', by
way of the '_package' event field.

[YOCTO #10849]

Signed-off-by: David Reyna <David.Reyna at windriver.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 5ed150d..f1fc551 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1258,6 +1258,15 @@ class BuildInfoHelper(object):
                 candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
                 if len(candidates) == 1:
                     identifier = candidates[0]
+                # break tie if missing 'native[sdk]:' prefix
+                if (len(candidates) == 2) and hasattr(event,'_package'):
+                    if (0 <= str(event._package).find('native-')):
+                        identifier = 'native:' + identifier
+                    if (0 <= str(event._package).find('nativesdk-')):
+                        identifier = 'nativesdk:' + identifier
+                    candidates = [x for x in self.internal_state['taskdata'].keys() if x.endswith(identifier)]
+                    if len(candidates) == 1:
+                        identifier = candidates[0]
 
         assert identifier in self.internal_state['taskdata']
         identifierlist = identifier.split(":")
-- 
1.9.1


More information about the toaster mailing list