summaryrefslogtreecommitdiffstats
path: root/lib/bb/parse/__init__.py
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2009-07-18 22:36:32 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-02-12 23:00:02 +0000
commit3cd06ed487ee0617892f154cff461379a323a1fb (patch)
treefd3e9a3878bc32451c92fa61f6034c1a653dfec8 /lib/bb/parse/__init__.py
parent9c8bd8f6e4817d567fad1ce78238563dd426a835 (diff)
downloadbitbake-contrib-3cd06ed487ee0617892f154cff461379a323a1fb.tar.gz
[parse] Use bb.which in resolve_file
Signed-off-by: Chris Larson <clarson@kergoth.com>
Diffstat (limited to 'lib/bb/parse/__init__.py')
-rw-r--r--lib/bb/parse/__init__.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py
index 5e74afd9a..2a7897cdf 100644
--- a/lib/bb/parse/__init__.py
+++ b/lib/bb/parse/__init__.py
@@ -82,13 +82,9 @@ def init(fn, data):
def resolve_file(fn, d):
if not os.path.isabs(fn):
- bbpath = (bb.data.getVar('BBPATH', d, 1) or '').split(':')
- for p in bbpath:
- j = os.path.join(p, fn)
- if os.access(j, os.R_OK):
- bb.msg.debug(2, bb.msg.domain.Parsing, "LOAD %s" % j)
- return j
- raise IOError("file %s not found" % fn)
+ fn = bb.which(bb.data.getVar("BBPATH", d, 1), fn)
+ if not fn:
+ raise IOError("file %s not found" % fn)
bb.msg.debug(2, bb.msg.domain.Parsing, "LOAD %s" % fn)
return fn