summaryrefslogtreecommitdiffstats
path: root/meta/classes
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
parent58a8a38aa294edb74dde70d70a7e5faf49444b78 (diff)
downloadast2050-yocto-poky-ad23395cd1f6c0cbfcc6980b6071d589f9f6cde0.zip
ast2050-yocto-poky-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')
-rw-r--r--meta/classes/base.bbclass17
-rw-r--r--meta/classes/cross-canadian.bbclass2
-rw-r--r--meta/classes/distrodata.bbclass6
-rw-r--r--meta/classes/insane.bbclass4
-rw-r--r--meta/classes/nativesdk.bbclass2
-rw-r--r--meta/classes/package_rpm.bbclass2
-rw-r--r--meta/classes/pkgconfig.bbclass2
-rw-r--r--meta/classes/populate_sdk.bbclass1
-rw-r--r--meta/classes/populate_sdk_base.bbclass2
9 files changed, 20 insertions, 18 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 59febd1..801896a 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)
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index ed53118..aec7301 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -52,7 +52,7 @@ LDFLAGS = "${BUILDSDK_LDFLAGS} \
-Wl,-rpath-link,${STAGING_LIBDIR}/.. \
-Wl,-rpath,${libdir}/.. "
-DEPENDS_GETTEXT = "gettext-native gettext-nativesdk"
+DEPENDS_GETTEXT = "gettext-native nativesdk-gettext"
# Path mangling needed by the cross packaging
# Note that we use := here to ensure that libdir and includedir are
diff --git a/meta/classes/distrodata.bbclass b/meta/classes/distrodata.bbclass
index f196df5..0da10a1 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -33,10 +33,10 @@ python do_distrodata_np() {
localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
bb.data.update_data(localdata)
- if pn.find("-nativesdk") != -1:
- pnstripped = pn.split("-nativesdk")
+ if pn.find("nativesdk-") != -1:
+ pnstripped = pn.replace("nativesdk-", "")
bb.note("Native Split: %s" % pnstripped)
- localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
+ localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
bb.data.update_data(localdata)
if pn.find("-cross") != -1:
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 8b6f054..6de14e0 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -195,7 +195,7 @@ def package_qa_check_dev(path, name, d, elf, messages):
Check for ".so" library symlinks in non-dev packages
"""
- if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-nativesdk") and path.endswith(".so") and os.path.islink(path):
+ if not name.endswith("-dev") and not name.endswith("-dbg") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \
(name, package_qa_clean_path(path,d)))
@@ -726,7 +726,7 @@ Rerun configure task after fixing this. The path was '%s'""" % root)
if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d):
gt = "gettext-native"
elif bb.data.inherits_class('cross-canadian', d):
- gt = "gettext-nativesdk"
+ gt = "nativesdk-gettext"
else:
gt = "virtual/" + ml + "gettext"
deps = bb.utils.explode_deps(d.getVar('DEPENDS', True) or "")
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 8c0cd5b..3334817 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -52,8 +52,6 @@ baselib = "lib"
export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
-PKGSUFFIX = "-nativesdk"
-
python nativesdk_virtclass_handler () {
if not isinstance(e, bb.event.RecipePreFinalise):
return
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 2c4c89a..742f292 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -1114,7 +1114,7 @@ python do_package_rpm () {
targetsys = d.getVar('TARGET_SYS', True)
targetvendor = d.getVar('TARGET_VENDOR', True)
package_arch = d.getVar('PACKAGE_ARCH', True) or ""
- if package_arch not in "all any noarch".split():
+ if package_arch not in "all any noarch".split() and not package_arch.endswith("-nativesdk"):
ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_")
d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
else:
diff --git a/meta/classes/pkgconfig.bbclass b/meta/classes/pkgconfig.bbclass
index ddcf878..5908b7f 100644
--- a/meta/classes/pkgconfig.bbclass
+++ b/meta/classes/pkgconfig.bbclass
@@ -2,6 +2,6 @@ DEPENDS_prepend = "pkgconfig-native "
PKGCONFIGRDEP = "pkgconfig"
PKGCONFIGRDEP_virtclass-native = ""
-PKGCONFIGRDEP_virtclass-nativesdk = "pkgconfig-nativesdk"
+PKGCONFIGRDEP_virtclass-nativesdk = "nativesdk-pkgconfig"
RDEPENDS_${PN}-dev += "${PKGCONFIGRDEP}"
diff --git a/meta/classes/populate_sdk.bbclass b/meta/classes/populate_sdk.bbclass
index e5bb540..f64a911 100644
--- a/meta/classes/populate_sdk.bbclass
+++ b/meta/classes/populate_sdk.bbclass
@@ -4,3 +4,4 @@
inherit populate_sdk_base
addtask populate_sdk after do_install before do_build
+
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index a1cb12a..c9fb00d 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -7,7 +7,7 @@ SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${MULTIMACH_TARGET_SYS}"
-TOOLCHAIN_HOST_TASK ?= "task-sdk-host-nativesdk task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+TOOLCHAIN_HOST_TASK ?= "nativesdk-task-sdk-host task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= ""
TOOLCHAIN_TARGET_TASK ?= "task-core-standalone-sdk-target task-core-standalone-sdk-target-dbg"
TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= ""
OpenPOWER on IntegriCloud