summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/native.bbclass7
-rw-r--r--classes/nativesdk.bbclass5
-rw-r--r--classes/packaged-staging.bbclass24
3 files changed, 19 insertions, 17 deletions
diff --git a/classes/native.bbclass b/classes/native.bbclass
index 3437836de7..345bd8028d 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -91,6 +91,12 @@ ORIG_DEPENDS := "${DEPENDS}"
DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}"
+def native_virtclass_add_override(d):
+ if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
+ bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-native", d)
+
+OVERRIDES .= "${@native_virtclass_add_override(d)}"
+
python __anonymous () {
# If we've a legacy native do_stage, we need to neuter do_install
stagefunc = bb.data.getVar('do_stage', d, True)
@@ -124,6 +130,5 @@ python __anonymous () {
provides = provides.replace(prov, prov + "-native")
bb.data.setVar("PROVIDES", provides, d)
- bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-native", d)
}
diff --git a/classes/nativesdk.bbclass b/classes/nativesdk.bbclass
index ddaab85e53..f3f993033f 100644
--- a/classes/nativesdk.bbclass
+++ b/classes/nativesdk.bbclass
@@ -52,6 +52,8 @@ export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
ORIG_DEPENDS := "${DEPENDS}"
DEPENDS_virtclass-nativesdk ?= "${ORIG_DEPENDS}"
+OVERRIDES .= ":virtclass-nativesdk"
+
python __anonymous () {
pn = bb.data.getVar("PN", d, True)
depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True)
@@ -74,7 +76,4 @@ python __anonymous () {
if not prov.endswith("-nativesdk"):
provides = provides.replace(prov, prov + "-nativesdk")
bb.data.setVar("PROVIDES", provides, d)
- bb.data.setVar("OVERRIDES", bb.data.getVar("OVERRIDES", d, False) + ":virtclass-nativesdk", d)
}
-
-
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index 9f369485b5..88472438ff 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -29,22 +29,20 @@ PSTAGE_NATIVEDEPENDS = "\
BB_STAMP_WHITELIST = "${PSTAGE_NATIVEDEPENDS}"
python __anonymous() {
+ pstage_allowed = True
+
# We need PSTAGE_PKGARCH to contain information about the target.
if bb.data.inherits_class('cross', d):
bb.data.setVar('PSTAGE_PKGARCH', "${HOST_SYS}-${PACKAGE_ARCH}-${TARGET_OS}", d)
-}
-
-python () {
- pstage_allowed = True
- # These classes encode staging paths into the binary data so can only be
- # reused if the path doesn't change/
- if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('sdk', d) or bb.data.inherits_class('crosssdk', d):
+ # These classes encode staging paths data files so we must mangle them
+ # for reuse.
+ if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('sdk', d):
scan_cmd = "grep -Irl ${STAGING_DIR} ${PSTAGE_TMPDIR_STAGE}"
bb.data.setVar('PSTAGE_SCAN_CMD', scan_cmd, d)
- # PSTAGE_NATIVEDEPENDS lists the packages we need before we can use packaged
- # staging. There will always be some packages we depend on.
+ # PSTAGE_NATIVEDEPENDS lists the packages we need before we can use
+ # packaged staging. There will always be some packages we depend on.
if bb.data.inherits_class('native', d):
pn = bb.data.getVar('PN', d, True)
nativedeps = bb.data.getVar('PSTAGE_NATIVEDEPENDS', d, True).split()
@@ -55,7 +53,10 @@ python () {
if bb.data.inherits_class('image', d):
pstage_allowed = False
- if bb.data.getVar('PSTAGING_DISABLED', d, True) == "1":
+ # We need OVERRIDES to be evaluated and applied.
+ localdata = d.createCopy()
+ bb.data.update_data(localdata)
+ if localdata.getVar('PSTAGING_DISABLED', True) == "1":
pstage_allowed = False
# Add task dependencies if we're active, otherwise mark packaged staging
@@ -318,9 +319,6 @@ populate_sysroot_postamble () {
if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
exit $exitcode
fi
- if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
- exit $exitcode
- fi
set -e
fi
}