summaryrefslogtreecommitdiff
path: root/meta/classes/native.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-25 08:52:22 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-25 08:54:24 +0100
commit4434977ccb95f8f366ba133366093b8c7ef1f718 (patch)
tree141e363c67c430fe68d0d908486877ddb2396f61 /meta/classes/native.bbclass
parent4bb586a470a15cf3b93538e8c749a6fb8479c990 (diff)
downloadopenembedded-core-4434977ccb95f8f366ba133366093b8c7ef1f718.tar.gz
openembedded-core-4434977ccb95f8f366ba133366093b8c7ef1f718.tar.bz2
openembedded-core-4434977ccb95f8f366ba133366093b8c7ef1f718.zip
native: Improve PROVIDES handling
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>
Diffstat (limited to 'meta/classes/native.bbclass')
-rw-r--r--meta/classes/native.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 1f8139bec8..71b05720f2 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -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")