native: fix duplicating virtclass-native entries in OVERRIDES
authorChris Larson <chris_larson@mentor.com>
Wed, 16 Feb 2011 21:48:57 +0000 (14:48 -0700)
committerChris Larson <chris_larson@mentor.com>
Wed, 16 Feb 2011 21:56:25 +0000 (14:56 -0700)
A function was called from ${@} in OVERRIDES which was supposed to return the
bits to prepend when in virtclass context, yet it *set* overrides instead,
returning None.  This resulted in 1) adding an extra virtclass-native to
OVERRIDES each time it was expanded, and 2) appending None, causing
'localNone' to be in overrides rather than the expected 'local'.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
classes/native.bbclass

index 2356581..000ad61 100644 (file)
@@ -92,11 +92,11 @@ ORIG_DEPENDS := "${DEPENDS}"
 
 DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}"
 
-def native_virtclass_add_override(d):
+def native_virtclass_override(d):
     if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
-        bb.data.setVar("OVERRIDES", "virtclass-native:" + bb.data.getVar("OVERRIDES", d, False), d)
+        return 'virtclass-native:'
 
-OVERRIDES .= "${@native_virtclass_add_override(d)}"
+OVERRIDES =. "${@native_virtclass_override(d)}"
 
 python __anonymous () {
     # If we've a legacy native do_stage, we need to neuter do_install