From 42446f681a3e70015d48cf51b0b5cb78b47930c3 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 28 Jul 2010 13:56:08 -0700 Subject: packaged-staging, native{,sdk}: Rework OVERRIDES to check PSTAGING_DISABLED When the function to set PSTAGING_ACTIVE is an anon python function OVERRIDES is not set so we cannot set things to disabled in the context of BBCLASSEXTEND recipes. To fix this we need to have native/nativesdk set OVERRIDES outside of the anon function context. We then make a COW of the data at this point in packaged-staging's anon function and evaluate so we know what will be in OVERRIDES and check. While we're in here drop a duplicate test in populate_sysroot_postamble and check nativesdk along with the rest of the classes that need mangling. Signed-off-by: Tom Rini --- classes/native.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'classes/native.bbclass') 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) } -- cgit 1.2.3-korg