aboutsummaryrefslogtreecommitdiffstats
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-08-31 10:21:04 -0700
commit81813c0e322dc04ce4b069117188d8a54dfddb8c (patch)
tree3363bac6dcdcdad14ba58efcea39529436cdf72d /meta/classes/base.bbclass
parentf01f0b8aed25af889f48fe1afff96feb3d9ed120 (diff)
downloadopenembedded-core-81813c0e322dc04ce4b069117188d8a54dfddb8c.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. 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):
for v in versions:
val = d.getVar(v, False)
pkg = v.replace("PREFERRED_VERSION_", "")
- if pkg.endswith("-native") or pkg.endswith("-nativesdk"):
+ if pkg.endswith("-native") or pkg.startswith("nativesdk-"):
continue
for p in prefixes:
newname = "PREFERRED_VERSION_" + p + "-" + pkg
@@ -201,7 +201,7 @@ def preferred_ml_updates(d):
for prov in providers:
val = d.getVar(prov, False)
pkg = prov.replace("PREFERRED_PROVIDER_", "")
- if pkg.endswith("-native") or pkg.endswith("-nativesdk"):
+ if pkg.endswith("-native") or pkg.startswith("nativesdk-"):
continue
virt = ""
if pkg.startswith("virtual/"):
@@ -218,7 +218,7 @@ def preferred_ml_updates(d):
mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
extramp = []
for p in mp:
- if p.endswith("-native") or p.endswith("-nativesdk"):
+ if p.endswith("-native") or p.startswith("nativesdk-"):
continue
virt = ""
if p.startswith("virtual/"):
@@ -359,15 +359,18 @@ python () {
subs = a.split("/", 1)[1]
newappends.append("virtual/" + prefix + subs + extension)
else:
- newappends.append(prefix + a + extension)
+ if a.startswith(prefix):
+ newappends.append(a + extension)
+ else:
+ newappends.append(prefix + a + extension)
return newappends
def appendVar(varname, appends):
if not appends:
return
if varname.find("DEPENDS") != -1:
- if pn.endswith("-nativesdk"):
- appends = expandFilter(appends, "-nativesdk", "")
+ if pn.startswith("nativesdk-"):
+ appends = expandFilter(appends, "", "nativesdk-")
if pn.endswith("-native"):
appends = expandFilter(appends, "-native", "")
if mlprefix:
@@ -456,7 +459,7 @@ python () {
dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', True)
- 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"):
+ 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-"):
# Internally, we'll use the license mapping. This way INCOMPATIBLE_LICENSE = "GPLv2" and
# INCOMPATIBLE_LICENSE = "GPLv2.0" will pick up all variations of GPL-2.0
spdx_license = return_spdx(d, dont_want_license)