diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-04 10:42:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-05 16:41:32 +0100 |
commit | 88e4600aa66dda2e6c807f9d97af8982bcd8817b (patch) | |
tree | db5867a60dff23e3ef56c1ba135706075bce01a7 /lib/bb/parse | |
parent | a52242bb4d928b9abba8a3489e350e4615a9da29 (diff) | |
download | bitbake-contrib-88e4600aa66dda2e6c807f9d97af8982bcd8817b.tar.gz |
parse/BBHandler: Avoid repeatedly resetting FILE
If we're not going to change the value of FILE, or we know it isn't
going to have changed (ext == bbclass), don't set FILE.
This avoids messy looking history of the variable as well as optimises
parsing speed slightly.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/parse')
-rw-r--r-- | lib/bb/parse/parse_py/BBHandler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py index 85c27c24c..03109dfbb 100644 --- a/lib/bb/parse/parse_py/BBHandler.py +++ b/lib/bb/parse/parse_py/BBHandler.py @@ -148,7 +148,7 @@ def handle(fn, d, include): statements = get_statements(fn, abs_fn, base_name) # DONE WITH PARSING... time to evaluate - if ext != ".bbclass": + if ext != ".bbclass" and abs_fn != oldfile: d.setVar('FILE', abs_fn) try: @@ -166,7 +166,7 @@ def handle(fn, d, include): if ext != ".bbclass" and include == 0: return ast.multi_finalize(fn, d) - if oldfile: + if ext != ".bbclass" and oldfile and abs_fn != oldfile: d.setVar("FILE", oldfile) return d |