summaryrefslogtreecommitdiffstats
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-26 10:57:51 +0100
commitfe405a49689a6be7c021f053d1fcca533f7d2070 (patch)
tree6b371b98901eb7d53ce7d57369e3e2f20b4af346 /meta/classes/native.bbclass
parenta9cb4dd158a2ab5f511aea1371a945f6cfd71314 (diff)
downloadpoky-fe405a49689a6be7c021f053d1fcca533f7d2070.tar.gz
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. (From OE-Core rev: 4434977ccb95f8f366ba133366093b8c7ef1f718) 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 () {
154 nprovides = [] 154 nprovides = []
155 for prov in provides.split(): 155 for prov in provides.split():
156 if prov.find(pn) != -1: 156 if prov.find(pn) != -1:
157 continue 157 nprovides.append(prov)
158 if not prov.endswith("-native"): 158 elif not prov.endswith("-native"):
159 nprovides.append(prov.replace(prov, prov + "-native")) 159 nprovides.append(prov.replace(prov, prov + "-native"))
160 else:
161 nprovides.append(prov)
160 e.data.setVar("PROVIDES", ' '.join(nprovides)) 162 e.data.setVar("PROVIDES", ' '.join(nprovides))
161 163
162 e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native") 164 e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-native")