summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-07 11:20:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-14 16:55:22 +0100
commit0bd63125c3b44a656e44f2a76cc5f832c9db4bbd (patch)
tree65b571722c7560ed779a2235364a20cd2a9fbcb1 /meta/classes
parent5e3ed0b3a6d0f2ea484464e14028d0c9d3c3705d (diff)
downloadpoky-0bd63125c3b44a656e44f2a76cc5f832c9db4bbd.tar.gz
utils.bbclass: Fix override ordering for FILESPATH
Currently the overrides are being applied backwards. This means something which is platform specific is overriding something which is machine specific which is clearly not intended. This patch corrects the ordering to match the normal expected behaviour of OVERRIDES. Secondly, all overrides are being searched for each path in turn. What should really happen is that we should look for the highest priority override (e.g. distro or machine) in each layer, then move on to platform/tune (e.g. armv7a) and then to arch (e.g. arm). This patch therefore also reverses the for loops to achieve this behaviour and give the result the user would expect. (From OE-Core rev: 92cbf7eeea553bfa24c7081473fa8bc4ebc1f552) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/utils.bbclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index d1f6563a0a..0a533afb1f 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -307,10 +307,11 @@ def base_set_filespath(path, d):
307 if extrapaths != "": 307 if extrapaths != "":
308 path = extrapaths.split(":") + path 308 path = extrapaths.split(":") + path
309 # The ":" ensures we have an 'empty' override 309 # The ":" ensures we have an 'empty' override
310 overrides = ((d.getVar("FILESOVERRIDES", True) or "") + ":").split(":") 310 overrides = (":" + (d.getVar("FILESOVERRIDES", True) or "")).split(":")
311 for p in path: 311 overrides.reverse()
312 if p != "": 312 for o in overrides:
313 for o in overrides: 313 for p in path:
314 if p != "":
314 filespath.append(os.path.join(p, o)) 315 filespath.append(os.path.join(p, o))
315 return ":".join(filespath) 316 return ":".join(filespath)
316 317