Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [RFC PATCH 2/3] base.bbclass: Merge two ConfigParsed event handlers
Date: Wed, 26 Mar 2014 09:31:09 +0000	[thread overview]
Message-ID: <1395826269.24890.82.camel@ted> (raw)

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>
---
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f085173..360b112 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -38,13 +38,6 @@ def oe_import(d):
 BASEIMPORTS = "${@oe_import(d)}"
 inherit ${BASEIMPORTS}
 
-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
@@ -296,6 +289,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)




                 reply	other threads:[~2014-03-26  9:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395826269.24890.82.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox