summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-10 14:11:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-12 22:53:18 +0100
commitd47c496aa058f5b18d03a68bcd79e5c8607de34f (patch)
treef8f6dd548c78d931f1d0f0e454abd0eccddc0b95
parent18cc6d2ec4dc289bb0333dddc96df5a645ea53d0 (diff)
downloadopenembedded-core-contrib-d47c496aa058f5b18d03a68bcd79e5c8607de34f.tar.gz
openembedded-core-contrib-d47c496aa058f5b18d03a68bcd79e5c8607de34f.tar.bz2
openembedded-core-contrib-d47c496aa058f5b18d03a68bcd79e5c8607de34f.zip
lib/oe/recipeutils: Ensure order of data store doesn't influence the result
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>
-rw-r--r--meta/lib/oe/recipeutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index d8094c8769..ccec2a1444 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])