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)
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')
-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 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)
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index ed53118a2f..aec7301981 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -52,7 +52,7 @@ LDFLAGS = "${BUILDSDK_LDFLAGS} \
52 -Wl,-rpath-link,${STAGING_LIBDIR}/.. \ 52 -Wl,-rpath-link,${STAGING_LIBDIR}/.. \
53 -Wl,-rpath,${libdir}/.. " 53 -Wl,-rpath,${libdir}/.. "
54 54
55DEPENDS_GETTEXT = "gettext-native gettext-nativesdk" 55DEPENDS_GETTEXT = "gettext-native nativesdk-gettext"
56 56
57# Path mangling needed by the cross packaging 57# Path mangling needed by the cross packaging
58# Note that we use := here to ensure that libdir and includedir are 58# 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 f196df5f56..0da10a1dd1 100644
--- a/meta/classes/distrodata.bbclass
+++ b/meta/classes/distrodata.bbclass
@@ -33,10 +33,10 @@ python do_distrodata_np() {
33 localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True)) 33 localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True))
34 bb.data.update_data(localdata) 34 bb.data.update_data(localdata)
35 35
36 if pn.find("-nativesdk") != -1: 36 if pn.find("nativesdk-") != -1:
37 pnstripped = pn.split("-nativesdk") 37 pnstripped = pn.replace("nativesdk-", "")
38 bb.note("Native Split: %s" % pnstripped) 38 bb.note("Native Split: %s" % pnstripped)
39 localdata.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True)) 39 localdata.setVar('OVERRIDES', "pn-" + pnstripped + ":" + d.getVar('OVERRIDES', True))
40 bb.data.update_data(localdata) 40 bb.data.update_data(localdata)
41 41
42 if pn.find("-cross") != -1: 42 if pn.find("-cross") != -1:
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 8b6f05413d..6de14e0cac 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):
195 Check for ".so" library symlinks in non-dev packages 195 Check for ".so" library symlinks in non-dev packages
196 """ 196 """
197 197
198 if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-nativesdk") and path.endswith(".so") and os.path.islink(path): 198 if not name.endswith("-dev") and not name.endswith("-dbg") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
199 messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \ 199 messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \
200 (name, package_qa_clean_path(path,d))) 200 (name, package_qa_clean_path(path,d)))
201 201
@@ -726,7 +726,7 @@ Rerun configure task after fixing this. The path was '%s'""" % root)
726 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): 726 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):
727 gt = "gettext-native" 727 gt = "gettext-native"
728 elif bb.data.inherits_class('cross-canadian', d): 728 elif bb.data.inherits_class('cross-canadian', d):
729 gt = "gettext-nativesdk" 729 gt = "nativesdk-gettext"
730 else: 730 else:
731 gt = "virtual/" + ml + "gettext" 731 gt = "virtual/" + ml + "gettext"
732 deps = bb.utils.explode_deps(d.getVar('DEPENDS', True) or "") 732 deps = bb.utils.explode_deps(d.getVar('DEPENDS', True) or "")
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 8c0cd5bea1..3334817da0 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -52,8 +52,6 @@ baselib = "lib"
52export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" 52export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
53export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" 53export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
54 54
55PKGSUFFIX = "-nativesdk"
56
57python nativesdk_virtclass_handler () { 55python nativesdk_virtclass_handler () {
58 if not isinstance(e, bb.event.RecipePreFinalise): 56 if not isinstance(e, bb.event.RecipePreFinalise):
59 return 57 return
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 2c4c89a256..742f292307 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -1114,7 +1114,7 @@ python do_package_rpm () {
1114 targetsys = d.getVar('TARGET_SYS', True) 1114 targetsys = d.getVar('TARGET_SYS', True)
1115 targetvendor = d.getVar('TARGET_VENDOR', True) 1115 targetvendor = d.getVar('TARGET_VENDOR', True)
1116 package_arch = d.getVar('PACKAGE_ARCH', True) or "" 1116 package_arch = d.getVar('PACKAGE_ARCH', True) or ""
1117 if package_arch not in "all any noarch".split(): 1117 if package_arch not in "all any noarch".split() and not package_arch.endswith("-nativesdk"):
1118 ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_") 1118 ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_")
1119 d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch) 1119 d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
1120 else: 1120 else:
diff --git a/meta/classes/pkgconfig.bbclass b/meta/classes/pkgconfig.bbclass
index ddcf878220..5908b7f42d 100644
--- a/meta/classes/pkgconfig.bbclass
+++ b/meta/classes/pkgconfig.bbclass
@@ -2,6 +2,6 @@ DEPENDS_prepend = "pkgconfig-native "
2 2
3PKGCONFIGRDEP = "pkgconfig" 3PKGCONFIGRDEP = "pkgconfig"
4PKGCONFIGRDEP_virtclass-native = "" 4PKGCONFIGRDEP_virtclass-native = ""
5PKGCONFIGRDEP_virtclass-nativesdk = "pkgconfig-nativesdk" 5PKGCONFIGRDEP_virtclass-nativesdk = "nativesdk-pkgconfig"
6 6
7RDEPENDS_${PN}-dev += "${PKGCONFIGRDEP}" 7RDEPENDS_${PN}-dev += "${PKGCONFIGRDEP}"
diff --git a/meta/classes/populate_sdk.bbclass b/meta/classes/populate_sdk.bbclass
index e5bb54026e..f64a911b72 100644
--- a/meta/classes/populate_sdk.bbclass
+++ b/meta/classes/populate_sdk.bbclass
@@ -4,3 +4,4 @@
4inherit populate_sdk_base 4inherit populate_sdk_base
5 5
6addtask populate_sdk after do_install before do_build 6addtask populate_sdk after do_install before do_build
7
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index a1cb12a24a..c9fb00de48 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -7,7 +7,7 @@ SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
7 7
8SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${MULTIMACH_TARGET_SYS}" 8SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${MULTIMACH_TARGET_SYS}"
9 9
10TOOLCHAIN_HOST_TASK ?= "task-sdk-host-nativesdk task-cross-canadian-${TRANSLATED_TARGET_ARCH}" 10TOOLCHAIN_HOST_TASK ?= "nativesdk-task-sdk-host task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
11TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= "" 11TOOLCHAIN_HOST_TASK_ATTEMPTONLY ?= ""
12TOOLCHAIN_TARGET_TASK ?= "task-core-standalone-sdk-target task-core-standalone-sdk-target-dbg" 12TOOLCHAIN_TARGET_TASK ?= "task-core-standalone-sdk-target task-core-standalone-sdk-target-dbg"
13TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= "" 13TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= ""