summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-01 15:39:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-01 22:49:00 +0100
commit9068a65baf4a28d04efad9297b16a2883ac42689 (patch)
treebb272cac868eee98a98f1393accc80a86f7da1ac
parentfba380a2a37f04de04c0626c0a09cfe757c24341 (diff)
downloadopenembedded-core-9068a65baf4a28d04efad9297b16a2883ac42689.tar.gz
openembedded-core-9068a65baf4a28d04efad9297b16a2883ac42689.tar.bz2
openembedded-core-9068a65baf4a28d04efad9297b16a2883ac42689.zip
base.bbclass: Silence PREFERRED_PROVIDER warnings for sdk builds
Unfortunately expandKeys() notices overlap between the SDK and TARGET PREFERRED_PROVIDERS entries when we set things up for the SDK recipes. To avoid this, delete one of the sets of keys to avoid supurious warnings. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/base.bbclass14
1 files changed, 13 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 2468b03cce..10cb84ac91 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -284,7 +284,7 @@ def buildcfg_neededvars(d):
bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser))
addhandler base_eventhandler
-base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted"
+base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise"
python base_eventhandler() {
if isinstance(e, bb.event.ConfigParsed):
e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
@@ -309,6 +309,18 @@ python base_eventhandler() {
statusheader = e.data.getVar('BUILDCFG_HEADER', True)
bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
+
+ # This code is to silence warnings where the SDK variables overwrite the
+ # target ones and we'd see dulpicate key names overwriting each other
+ # for various PREFERRED_PROVIDERS
+ if isinstance(e, bb.event.RecipePreFinalise):
+ if e.data.getVar("TARGET_PREFIX", True) == e.data.getVar("SDK_PREFIX", True):
+ e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils")
+ e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial")
+ e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc")
+ e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++")
+ e.data.delVar("PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs")
+
}
addtask configure after do_patch