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)
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)
}
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)
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)
}
-
-
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()
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
if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
exit $exitcode
fi
- if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
- exit $exitcode
- fi
set -e
fi
}