summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-22 17:43:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-02 05:52:06 -0700
commitad23395cd1f6c0cbfcc6980b6071d589f9f6cde0 (patch)
tree9965e27a93c73af1ccf9cdb24c588faabc90370a /meta/classes/base.bbclass
parent58a8a38aa294edb74dde70d70a7e5faf49444b78 (diff)
downloadpoky-ad23395cd1f6c0cbfcc6980b6071d589f9f6cde0.tar.gz
nativesdk: Switch to using nativesdk as a prefix, not a suffix
As discussed on the mailing lists, using a suffix to package names is hard and has lead to many recipes having to do PKGSUFFIX games. Its looking extremely hard to scale nativesdk much further without hacking many recipes. By comparison, using a prefix like multilib does works much better and doesn't involve "hacking" as many recipes. This change converts nativesdk to use a prefix using the existing multilib infrastructure. (From OE-Core rev: 81813c0e322dc04ce4b069117188d8a54dfddb8c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass17
1 files changed, 10 insertions, 7 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 59febd1022..801896a5b9 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -191,7 +191,7 @@ def preferred_ml_updates(d):
191 for v in versions: 191 for v in versions:
192 val = d.getVar(v, False) 192 val = d.getVar(v, False)
193 pkg = v.replace("PREFERRED_VERSION_", "") 193 pkg = v.replace("PREFERRED_VERSION_", "")
194 if pkg.endswith("-native") or pkg.endswith("-nativesdk"): 194 if pkg.endswith("-native") or pkg.startswith("nativesdk-"):
195 continue 195 continue
196 for p in prefixes: 196 for p in prefixes:
197 newname = "PREFERRED_VERSION_" + p + "-" + pkg 197 newname = "PREFERRED_VERSION_" + p + "-" + pkg
@@ -201,7 +201,7 @@ def preferred_ml_updates(d):
201 for prov in providers: 201 for prov in providers:
202 val = d.getVar(prov, False) 202 val = d.getVar(prov, False)
203 pkg = prov.replace("PREFERRED_PROVIDER_", "") 203 pkg = prov.replace("PREFERRED_PROVIDER_", "")
204 if pkg.endswith("-native") or pkg.endswith("-nativesdk"): 204 if pkg.endswith("-native") or pkg.startswith("nativesdk-"):
205 continue 205 continue
206 virt = "" 206 virt = ""
207 if pkg.startswith("virtual/"): 207 if pkg.startswith("virtual/"):
@@ -218,7 +218,7 @@ def preferred_ml_updates(d):
218 mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split() 218 mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
219 extramp = [] 219 extramp = []
220 for p in mp: 220 for p in mp:
221 if p.endswith("-native") or p.endswith("-nativesdk"): 221 if p.endswith("-native") or p.startswith("nativesdk-"):
222 continue 222 continue
223 virt = "" 223 virt = ""
224 if p.startswith("virtual/"): 224 if p.startswith("virtual/"):
@@ -359,15 +359,18 @@ python () {
359 subs = a.split("/", 1)[1] 359 subs = a.split("/", 1)[1]
360 newappends.append("virtual/" + prefix + subs + extension) 360 newappends.append("virtual/" + prefix + subs + extension)
361 else: 361 else:
362 newappends.append(prefix + a + extension) 362 if a.startswith(prefix):
363 newappends.append(a + extension)
364 else:
365 newappends.append(prefix + a + extension)
363 return newappends 366 return newappends
364 367
365 def appendVar(varname, appends): 368 def appendVar(varname, appends):
366 if not appends: 369 if not appends:
367 return 370 return
368 if varname.find("DEPENDS") != -1: 371 if varname.find("DEPENDS") != -1:
369 if pn.endswith("-nativesdk"): 372 if pn.startswith("nativesdk-"):
370 appends = expandFilter(appends, "-nativesdk", "") 373 appends = expandFilter(appends, "", "nativesdk-")
371 if pn.endswith("-native"): 374 if pn.endswith("-native"):
372 appends = expandFilter(appends, "-native", "") 375 appends = expandFilter(appends, "-native", "")
373 if mlprefix: 376 if mlprefix:
@@ -456,7 +459,7 @@ python () {
456 459
457 dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', True) 460 dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', True)
458 461
459 if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial") and not pn.endswith("-cross-canadian-%s" % d.getVar('TRANSLATED_TARGET_ARCH', True)) and not pn.endswith("-nativesdk"): 462 if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial") and not pn.endswith("-cross-canadian-%s" % d.getVar('TRANSLATED_TARGET_ARCH', True)) and not pn.startswith("nativesdk-"):
460 # Internally, we'll use the license mapping. This way INCOMPATIBLE_LICENSE = "GPLv2" and 463 # Internally, we'll use the license mapping. This way INCOMPATIBLE_LICENSE = "GPLv2" and
461 # INCOMPATIBLE_LICENSE = "GPLv2.0" will pick up all variations of GPL-2.0 464 # INCOMPATIBLE_LICENSE = "GPLv2.0" will pick up all variations of GPL-2.0
462 spdx_license = return_spdx(d, dont_want_license) 465 spdx_license = return_spdx(d, dont_want_license)