We currently modify BBPATH so that an include/require looks in the current
working directory before it looks elsewhere. Modifying it permanently
doesn't gain anything, just polluting it with locations that don't need to
stay there.
Signed-off-by: Chris Larson <clarson@mvista.com>
f = open(fn,'r')
abs_fn = fn
- if ext != ".bbclass":
- dname = os.path.dirname(abs_fn)
- if dname not in bbpath:
- bbpath.insert(0, dname)
- data.setVar('BBPATH', ":".join(bbpath), d)
-
if include:
bb.parse.mark_dependency(d, abs_fn)
fn = bb.data.expand(fn, data)
oldfn = bb.data.expand(oldfn, data)
+ if not os.path.isabs(fn):
+ dname = os.path.dirname(oldfn)
+ bbpath = "%s:%s" % (dname, bb.data.getVar("BBPATH", data, 1))
+ abs_fn = bb.which(bbpath, fn)
+ if abs_fn:
+ fn = abs_fn
+
from bb.parse import handle
try:
ret = handle(fn, data, True)