base.bbclass: use oe.data for OE_IMPORTS

(From OE-Core rev: e02c0d809732bed3d170880c6faedafce8c60c21)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chris Larson
2011-05-18 13:40:07 -07:00
committed by Richard Purdie
parent adceb2e272
commit fc55b224ca

View File

@@ -11,6 +11,7 @@ inherit buildstats
inherit logging
OE_IMPORTS += "os sys time oe.path oe.utils oe.data"
OE_IMPORTS[type] = "list"
def oe_import(d):
import os, sys
@@ -25,7 +26,8 @@ def oe_import(d):
else:
__builtins__[name] = value
for toimport in d.getVar("OE_IMPORTS", True).split():
import oe.data
for toimport in oe.data.typed_value("OE_IMPORTS", d):
imported = __import__(toimport)
inject(toimport.split(".", 1)[0], imported)