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:42:01 +0100 |
commit | ffaa0f1b8ab9460399b440ed295c8fed7c678993 (patch) | |
tree | 1683d003246c95dcf7bfeb80a54205382333cc3e /bitbake/lib/bb/parse | |
parent | 7fff2edd6a099f60caed7585609155fef29b0d35 (diff) | |
download | poky-ffaa0f1b8ab9460399b440ed295c8fed7c678993.tar.gz |
bitbake: 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.
(Bitbake rev: 88e4600aa66dda2e6c807f9d97af8982bcd8817b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 85c27c24cc..03109dfbb2 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
@@ -148,7 +148,7 @@ def handle(fn, d, include): | |||
148 | statements = get_statements(fn, abs_fn, base_name) | 148 | statements = get_statements(fn, abs_fn, base_name) |
149 | 149 | ||
150 | # DONE WITH PARSING... time to evaluate | 150 | # DONE WITH PARSING... time to evaluate |
151 | if ext != ".bbclass": | 151 | if ext != ".bbclass" and abs_fn != oldfile: |
152 | d.setVar('FILE', abs_fn) | 152 | d.setVar('FILE', abs_fn) |
153 | 153 | ||
154 | try: | 154 | try: |
@@ -166,7 +166,7 @@ def handle(fn, d, include): | |||
166 | if ext != ".bbclass" and include == 0: | 166 | if ext != ".bbclass" and include == 0: |
167 | return ast.multi_finalize(fn, d) | 167 | return ast.multi_finalize(fn, d) |
168 | 168 | ||
169 | if oldfile: | 169 | if ext != ".bbclass" and oldfile and abs_fn != oldfile: |
170 | d.setVar("FILE", oldfile) | 170 | d.setVar("FILE", oldfile) |
171 | 171 | ||
172 | return d | 172 | return d |