Openembedded Core Discussions
 help / color / mirror / Atom feed
* lib/oe/recipeutils: Ensure order of data store doesn't influence the result
@ 2015-07-10 13:11 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2015-07-10 13:11 UTC (permalink / raw)
  To: openembedded-core

The order of the keys from the data store is not prescribed. If
target_datadir comes before datadir the selftests fail since the 'wrong'
variable is used for substitutions. This highlights an issue with the
replace_dir_vars() function. Fix this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index d8094c8..ccec2a1 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -620,7 +620,7 @@ def replace_dir_vars(path, d):
     for var in d:
         if var.endswith('dir') and var.lower() == var:
             value = d.getVar(var, True)
-            if value.startswith('/') and not '\n' in value:
+            if value.startswith('/') and not '\n' in value and value not in dirvars:
                 dirvars[value] = var
     for dirpath in sorted(dirvars.keys(), reverse=True):
         path = path.replace(dirpath, '${%s}' % dirvars[dirpath])




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-10 13:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-10 13:11 lib/oe/recipeutils: Ensure order of data store doesn't influence the result Richard Purdie

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