diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-26 09:30:33 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-27 09:42:06 +0000 |
commit | 0f77f3fa44c872a5ec61676d74168d9d8284d12c (patch) | |
tree | ee42d5e87a64122d9d22eedfe47a48e9b08e38d6 | |
parent | 315542df9a59b53e500a328d8c3d739b3dad17d5 (diff) | |
download | poky-0f77f3fa44c872a5ec61676d74168d9d8284d12c.tar.gz |
base.bbclass: Run oe_import before other INHERITs
Its possible for classes listed in INHERIT directives to use things like
the oe.utils functions. If that happens the user sees a traceback since
the modules don't become available until the ConfigParsed event.
This change to use immediate expansion means that the oe modules become available
much sooner and can be used in the core classes, including within base.bbclass.
(From OE-Core rev: a9ecad713f37f2703e99c6b856207abeb6c5ad1f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/base.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 76a4ef650d..7c39db9157 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -31,8 +31,12 @@ def oe_import(d): | |||
31 | imported = __import__(toimport) | 31 | imported = __import__(toimport) |
32 | inject(toimport.split(".", 1)[0], imported) | 32 | inject(toimport.split(".", 1)[0], imported) |
33 | 33 | ||
34 | return "" | ||
35 | |||
36 | # We need the oe module name space early (before INHERITs get added) | ||
37 | OE_IMPORTED := "${@oe_import(d)}" | ||
38 | |||
34 | python oe_import_eh () { | 39 | python oe_import_eh () { |
35 | oe_import(e.data) | ||
36 | e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data)) | 40 | e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data)) |
37 | } | 41 | } |
38 | 42 | ||