[oe-commits] Richard Purdie : base.bbclass: Ensure finalised data is displayed in build banner

git at git.openembedded.org git at git.openembedded.org
Tue Jul 9 09:45:56 UTC 2013


Module: openembedded-core.git
Branch: dylan
Commit: 3f6c1307e1ad2d3ca3fd53bfb7f2a5eac31bee33
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3f6c1307e1ad2d3ca3fd53bfb7f2a5eac31bee33

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Thu Jun 20 16:48:23 2013 +0100

base.bbclass: Ensure finalised data is displayed in build banner

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]

(From OE-Core master rev: bdce39f22a0e8c8e1cf237322657220e4201077d)

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/base.bbclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 641316d..1ca7d66 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -308,13 +308,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)
 



More information about the Openembedded-commits mailing list