From 107a9da00640a9e086a8608c20aee48aefd92893 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 11 May 2009 22:41:17 +0100 Subject: bitbake: Merge further fixes from upstream 1.8 branch * Make the test functionality work * Optimise BBPATH handling when changing directory * Optimise file globing for BBFILES Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/BBHandler.py | 6 ------ bitbake/lib/bb/parse/parse_py/ConfHandler.py | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'bitbake/lib/bb/parse/parse_py') diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 97786c4202..d13428aa0b 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py @@ -155,12 +155,6 @@ def handle(fn, d, include = 0): f = open(fn,'r') abs_fn = fn - if ext != ".bbclass": - dname = os.path.dirname(abs_fn) - if bbpath[0] != dname: - bbpath.insert(0, dname) - data.setVar('BBPATH', ":".join(bbpath), d) - if include: bb.parse.mark_dependency(d, abs_fn) diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index f8a49689e2..c9f1ea13fb 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -102,6 +102,13 @@ def include(oldfn, fn, data, error_out): 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) -- cgit v1.2.3-54-g00ecf