summaryrefslogtreecommitdiffstats
path: root/bitbake
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-15 17:07:56 +0000
commitc675bfd5bfb6719187d18e1646e499a4c346193c (patch)
treece1b3081206885d1789a6d6295aaa55943efef2b /bitbake
parent7b57ad901af2ded02995d22718ec6f280a9edd7f (diff)
downloadpoky-c675bfd5bfb6719187d18e1646e499a4c346193c.tar.gz
bitbake: [parse] Use bb.which in resolve_file
(Bitbake rev: 3cd06ed487ee0617892f154cff461379a323a1fb) Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/parse/__init__.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py
index 5e74afd9ac..2a7897cdf2 100644
--- a/bitbake/lib/bb/parse/__init__.py
+++ b/bitbake/lib/bb/parse/__init__.py
@@ -82,13 +82,9 @@ def init(fn, data):
82 82
83def resolve_file(fn, d): 83def resolve_file(fn, d):
84 if not os.path.isabs(fn): 84 if not os.path.isabs(fn):
85 bbpath = (bb.data.getVar('BBPATH', d, 1) or '').split(':') 85 fn = bb.which(bb.data.getVar("BBPATH", d, 1), fn)
86 for p in bbpath: 86 if not fn:
87 j = os.path.join(p, fn) 87 raise IOError("file %s not found" % fn)
88 if os.access(j, os.R_OK):
89 bb.msg.debug(2, bb.msg.domain.Parsing, "LOAD %s" % j)
90 return j
91 raise IOError("file %s not found" % fn)
92 88
93 bb.msg.debug(2, bb.msg.domain.Parsing, "LOAD %s" % fn) 89 bb.msg.debug(2, bb.msg.domain.Parsing, "LOAD %s" % fn)
94 return fn 90 return fn