]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: parse/BBHandler: Avoid repeatedly resetting FILE
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 4 Jun 2015 09:42:26 +0000 (10:42 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 5 Jun 2015 15:42:01 +0000 (16:42 +0100)
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>
bitbake/lib/bb/parse/parse_py/BBHandler.py

index 85c27c24cc616238e6ec81022ee49644859c503b..03109dfbb20ba7b18361c330abe05fe718910a97 100644 (file)
@@ -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