diff options
author | Chris Larson <clarson@kergoth.com> | 2009-04-08 17:37:30 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2009-04-08 17:37:30 +0000 |
commit | f71171f445fc7d846772ce5a87caf488df006cfc (patch) | |
tree | 2e10fd6df63e9ad8389ba0dfd6d110a03a68915e | |
parent | 8f5df854ac53b5d7e7dd2fe2432b781cb195383f (diff) | |
download | bitbake-f71171f445fc7d846772ce5a87caf488df006cfc.tar.gz |
Make the bbpath change for includes temporary rather than permanent.
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>
-rw-r--r-- | lib/bb/parse/parse_py/BBHandler.py | 6 | ||||
-rw-r--r-- | lib/bb/parse/parse_py/ConfHandler.py | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py index 3a309aed6..9b79338c4 100644 --- a/lib/bb/parse/parse_py/BBHandler.py +++ b/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/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py index f8a49689e..c9f1ea13f 100644 --- a/lib/bb/parse/parse_py/ConfHandler.py +++ b/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) |