[oe-commits] Richard Purdie : utils.bbclass: Fix override ordering for FILESPATH
git at git.openembedded.org
git at git.openembedded.org
Fri Oct 11 22:05:34 UTC 2013
Module: openembedded-core.git
Branch: master-next
Commit: 92cbf7eeea553bfa24c7081473fa8bc4ebc1f552
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=92cbf7eeea553bfa24c7081473fa8bc4ebc1f552
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date: Mon Oct 7 11:20:07 2013 +0000
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.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/utils.bbclass | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index d1f6563..0a533af 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -307,10 +307,11 @@ def base_set_filespath(path, d):
if extrapaths != "":
path = extrapaths.split(":") + path
# The ":" ensures we have an 'empty' override
- overrides = ((d.getVar("FILESOVERRIDES", True) or "") + ":").split(":")
- for p in path:
- if p != "":
- for o in overrides:
+ overrides = (":" + (d.getVar("FILESOVERRIDES", True) or "")).split(":")
+ overrides.reverse()
+ for o in overrides:
+ for p in path:
+ if p != "":
filespath.append(os.path.join(p, o))
return ":".join(filespath)
More information about the Openembedded-commits
mailing list