]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: Merge two ConfigParsed event handlers
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Mar 2014 09:31:09 +0000 (09:31 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Mar 2014 09:40:02 +0000 (09:40 +0000)
There were two ConfigParsed event handlers in base.bbclass, this merges
them together for small efficiency wins.

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

index 7c39db915773c4e75f7cc50d36c8519df789ad3b..f4f5321ac876159d40dfab90703e8f0168b818b6 100644 (file)
@@ -36,13 +36,6 @@ def oe_import(d):
 # We need the oe module name space early (before INHERITs get added)
 OE_IMPORTED := "${@oe_import(d)}"
 
-python oe_import_eh () {
-    e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
-}
-
-addhandler oe_import_eh
-oe_import_eh[eventmask] = "bb.event.ConfigParsed"
-
 def lsb_distro_identifier(d):
     adjust = d.getVar('LSB_DISTRO_ADJUST', True)
     adjust_func = None
@@ -294,6 +287,7 @@ addhandler base_eventhandler
 base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted"
 python base_eventhandler() {
     if isinstance(e, bb.event.ConfigParsed):
+        e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
         e.data.setVar('BB_VERSION', bb.__version__)
         pkgarch_mapping(e.data)
         preferred_ml_updates(e.data)