diff options
author | Chris Larson <clarson@kergoth.com> | 2009-04-08 17:35:38 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2009-04-08 17:35:38 +0000 |
commit | a50104766965a8f48a8455502b804a18a9be5c02 (patch) | |
tree | 375e87bc4d04ae62a76c4a468484d323a1a4b039 /lib/bb/parse | |
parent | eedbd1c47fda11e4a3d6c8278e864d5fff1ecbd4 (diff) | |
download | bitbake-a50104766965a8f48a8455502b804a18a9be5c02.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>
Diffstat (limited to 'lib/bb/parse')
-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 00ad6ef4f..453a8956e 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 dname not in bbpath: - 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) |