diff options
author | Chris Larson <clarson@kergoth.com> | 2004-12-09 13:03:17 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-12-09 13:03:17 +0000 |
commit | 5c776397080bec022ab02f8b8133b285959ae79f (patch) | |
tree | 3ae5b04f67ca2c722d764c075b253d2a6e69eb4e | |
parent | 6fc7d4f0f7390b45cd8b2ee8207a4a96f10ac563 (diff) | |
download | bitbake-5c776397080bec022ab02f8b8133b285959ae79f.tar.gz |
Clean up the BBPATH mangling bits in the parser.
-rw-r--r-- | lib/bb/parse/BBHandler.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/bb/parse/BBHandler.py b/lib/bb/parse/BBHandler.py index b3b96cb08..70d84cb06 100644 --- a/lib/bb/parse/BBHandler.py +++ b/lib/bb/parse/BBHandler.py @@ -90,12 +90,9 @@ def handle(fn, d = {}, include = 0): oldfile = None fn = obtain(fn, d) - bbpath = [] + bbpath = (data.getVar('BBPATH', d, 1) or '').split(':') if not os.path.isabs(fn): f = None - vbbpath = data.getVar("BBPATH", d) - if vbbpath: - bbpath += vbbpath.split(":") for p in bbpath: p = data.expand(p, d) j = os.path.join(p, fn) @@ -109,6 +106,10 @@ def handle(fn, d = {}, include = 0): f = open(fn,'r') abs_fn = fn + if ext != ".bbclass": + bbpath.insert(0, os.path.dirname(abs_fn)) + data.setVar('BBPATH', ":".join(bbpath), d) + if include: bb.parse.mark_dependency(d, abs_fn) @@ -119,11 +120,6 @@ def handle(fn, d = {}, include = 0): i[0:0] = ["base"] inherit(i, d) - if not bbpath: - bbpath = (data.getVar('BBPATH', d, 1) or "").split(':') - bbpath.insert(0, os.path.dirname(fn)) - data.setVar('BBPATH', ":".join(bbpath), d) - lineno = 0 while 1: lineno = lineno + 1 @@ -176,6 +172,7 @@ def handle(fn, d = {}, include = 0): pdeps.append(var) data.setVarFlag(p, 'deps', pdeps, d) bb.build.add_task(p, pdeps, d) + bbpath.pop(0) if oldfile: bb.data.setVar("FILE", oldfile, d) return d |