Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] utils.bbclass: Fix override ordering for FILESPATH
@ 2013-10-09 22:42 Richard Purdie
  2013-10-28 14:10 ` SRC_URI computing order Eric Bénard
  0 siblings, 1 reply; 16+ messages in thread
From: Richard Purdie @ 2013-10-09 22:42 UTC (permalink / raw)
  To: openembedded-core

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@linuxfoundation.org>
---
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)
 




^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-11-08 11:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-09 22:42 [PATCH] utils.bbclass: Fix override ordering for FILESPATH Richard Purdie
2013-10-28 14:10 ` SRC_URI computing order Eric Bénard
2013-10-29  3:45   ` Khem Raj
2013-10-29  7:28     ` Eric Bénard
2013-10-30 15:15       ` Richard Purdie
2013-11-02  8:47         ` Eric Bénard
2013-11-03 22:16           ` Andrea Adami
2013-11-03 23:10             ` Richard Purdie
2013-11-04 22:13               ` Andrea Adami
2013-11-06  8:45                 ` Andrea Adami
2013-11-07 23:20                   ` Richard Purdie
2013-11-08 11:55                     ` Otavio Salvador
2013-11-04  8:33             ` Eric Bénard
2013-11-01 15:36   ` Eric Bénard
2013-11-01 18:16     ` Richard Purdie
2013-11-02  8:45       ` Eric Bénard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox