]> code.ossystems Code Review - openembedded-core.git/commitdiff
native: Improve PROVIDES handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 May 2015 07:52:22 +0000 (08:52 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 May 2015 07:54:24 +0000 (08:54 +0100)
Since this class works on pre finalised data, the logic hasn't needed
to be exact. If we change the way the finalised data works, we find
that certain dependencies can be dropped (e.g. pn isn't in the name).

To fix this, restructure the function to alter each entry in turn
and not drop any entries.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/native.bbclass

index 1f8139bec86dde456cea871c89329d2553b18f00..71b05720f20f59cec1b32a2ee86c814ac0d01f93 100644 (file)
@@ -154,9 +154,11 @@ python native_virtclass_handler () {
     nprovides = []
     for prov in provides.split():
         if prov.find(pn) != -1:
-            continue
-        if not prov.endswith("-native"):
+            nprovides.append(prov)
+        elif not prov.endswith("-native"):
             nprovides.append(prov.replace(prov, prov + "-native"))
+        else:
+            nprovides.append(prov)
     e.data.setVar("PROVIDES", ' '.join(nprovides))
 
     e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native")