summaryrefslogtreecommitdiffstats
path: root/meta/classes/utils.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-19 22:27:17 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-21 16:56:03 +0000
commit73ef532777d816913a4abb3b1f9354880ccab264 (patch)
tree5934ab0f0797fe40c48100dcb1c65ea8a8280603 /meta/classes/utils.bbclass
parente6b313d68ead183573ec5951026dca46e2ad4d8c (diff)
downloadpoky-73ef532777d816913a4abb3b1f9354880ccab264.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. (From OE-Core rev: 566c0e874fc1610f3f97737b5601ef22026c918a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/utils.bbclass')
-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):
308 if extrapaths != "": 308 if extrapaths != "":
309 path = extrapaths.split(":") + path 309 path = extrapaths.split(":") + path
310 # The ":" ensures we have an 'empty' override 310 # The ":" ensures we have an 'empty' override
311 overrides = (d.getVar("OVERRIDES", True) or "") + ":" 311 overrides = ((d.getVar("OVERRIDES", True) or "") + ":").split(":")
312 for p in path: 312 for p in path:
313 if p != "": 313 if p != "":
314 for o in overrides.split(":"): 314 for o in overrides:
315 filespath.append(os.path.join(p, o)) 315 filespath.append(os.path.join(p, o))
316 return ":".join(filespath) 316 return ":".join(filespath)
317 317