mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 18:32:13 +02:00
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>
This commit is contained in:
@@ -31,8 +31,12 @@ def oe_import(d):
|
||||
imported = __import__(toimport)
|
||||
inject(toimport.split(".", 1)[0], imported)
|
||||
|
||||
return ""
|
||||
|
||||
# We need the oe module name space early (before INHERITs get added)
|
||||
OE_IMPORTED := "${@oe_import(d)}"
|
||||
|
||||
python oe_import_eh () {
|
||||
oe_import(e.data)
|
||||
e.data.setVar("NATIVELSBSTRING", lsb_distro_identifier(e.data))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user