]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: Ensure finalised data is displayed in build banner
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 20 Jun 2013 15:48:23 +0000 (16:48 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 20 Jun 2013 20:56:31 +0000 (21:56 +0100)
The build banner displayed at the start of builds can be misleading since
the data store has not been finalised. As easy way to illustrate this is
to use something like:

DEFAULTTUNE = "i586"
DEFAULTTUNE_<machineoverride> = "core2"

and the banner will display the i586 tune yet the core2 tune will be
used. We can avoid this if we finalise a copy of the data before
displaying it.

[YOCTO #4225]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass

index 3a0ff6bd635acaf4ef58d1f046576a91a50a853f..27edea8af96e1ed3a6623e8ead43dc7d368dc4d9 100644 (file)
@@ -309,13 +309,15 @@ python base_eventhandler() {
         oe.utils.features_backfill("MACHINE_FEATURES", e.data)
 
     if isinstance(e, bb.event.BuildStarted):
+        localdata = bb.data.createCopy(e.data)
+        bb.data.update_data(localdata)
         statuslines = []
-        for func in oe.data.typed_value('BUILDCFG_FUNCS', e.data):
+        for func in oe.data.typed_value('BUILDCFG_FUNCS', localdata):
             g = globals()
             if func not in g:
                 bb.warn("Build configuration function '%s' does not exist" % func)
             else:
-                flines = g[func](e.data)
+                flines = g[func](localdata)
                 if flines:
                     statuslines.extend(flines)