aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-19 22:27:17 +0000
committerMarcin Juszkiewicz <marcin.juszkiewicz@linaro.org>2012-11-29 12:00:35 +0100
commita1d0946c4eacc58f4fece780ce02b9d308481bfc (patch)
tree05607ec47d397913abc6b8ab22907255e777cef8
parent2d7f083dac41d654401747c9904ce67a1f0b409d (diff)
downloadopenembedded-core-contrib-a1d0946c4eacc58f4fece780ce02b9d308481bfc.tar.gz
utils: Optimise looping in base_set_filespath
Calling split on the same expression, once per loop iteration is inefficent and pointless, particularly in a function called by every recipe during parsing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/utils.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 52e511f5cf..c1de2f6930 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -308,10 +308,10 @@ def base_set_filespath(path, d):
if extrapaths != "":
path = extrapaths.split(":") + path
# The ":" ensures we have an 'empty' override
- overrides = (d.getVar("OVERRIDES", True) or "") + ":"
+ overrides = ((d.getVar("OVERRIDES", True) or "") + ":").split(":")
for p in path:
if p != "":
- for o in overrides.split(":"):
+ for o in overrides:
filespath.append(os.path.join(p, o))
return ":".join(filespath)