diff options
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 1189114341..18e6868387 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
@@ -44,17 +44,24 @@ def inherit(files, fn, lineno, d): | |||
44 | __inherit_cache = d.getVar('__inherit_cache', False) or [] | 44 | __inherit_cache = d.getVar('__inherit_cache', False) or [] |
45 | files = d.expand(files).split() | 45 | files = d.expand(files).split() |
46 | for file in files: | 46 | for file in files: |
47 | if not os.path.isabs(file) and not file.endswith(".bbclass"): | 47 | classtype = d.getVar("__bbclasstype", False) |
48 | file = os.path.join('classes', '%s.bbclass' % file) | 48 | origfile = file |
49 | 49 | for t in ["classes-" + classtype, "classes"]: | |
50 | if not os.path.isabs(file): | 50 | file = origfile |
51 | bbpath = d.getVar("BBPATH") | 51 | if not os.path.isabs(file) and not file.endswith(".bbclass"): |
52 | abs_fn, attempts = bb.utils.which(bbpath, file, history=True) | 52 | file = os.path.join(t, '%s.bbclass' % file) |
53 | for af in attempts: | 53 | |
54 | if af != abs_fn: | 54 | if not os.path.isabs(file): |
55 | bb.parse.mark_dependency(d, af) | 55 | bbpath = d.getVar("BBPATH") |
56 | if abs_fn: | 56 | abs_fn, attempts = bb.utils.which(bbpath, file, history=True) |
57 | file = abs_fn | 57 | for af in attempts: |
58 | if af != abs_fn: | ||
59 | bb.parse.mark_dependency(d, af) | ||
60 | if abs_fn: | ||
61 | file = abs_fn | ||
62 | |||
63 | if os.path.exists(file): | ||
64 | break | ||
58 | 65 | ||
59 | if not os.path.exists(file): | 66 | if not os.path.exists(file): |
60 | raise ParseError("Could not inherit file %s" % (file), fn, lineno) | 67 | raise ParseError("Could not inherit file %s" % (file), fn, lineno) |