summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/recipeutils.py
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:55:38 +0100
commitb60521c9b3ec9573ba987fc5ca0c7431bc5ad148 (patch)
treeab0fc3a75d00370cd37ebb18b50bcb7a2778101a /meta/lib/oe/recipeutils.py
parenta730981b75ebb528e447eb3e41c83440dbc133bd (diff)
downloadpoky-b60521c9b3ec9573ba987fc5ca0c7431bc5ad148.tar.gz
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. (From OE-Core rev: d47c496aa058f5b18d03a68bcd79e5c8607de34f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-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):
620 for var in d: 620 for var in d:
621 if var.endswith('dir') and var.lower() == var: 621 if var.endswith('dir') and var.lower() == var:
622 value = d.getVar(var, True) 622 value = d.getVar(var, True)
623 if value.startswith('/') and not '\n' in value: 623 if value.startswith('/') and not '\n' in value and value not in dirvars:
624 dirvars[value] = var 624 dirvars[value] = var
625 for dirpath in sorted(dirvars.keys(), reverse=True): 625 for dirpath in sorted(dirvars.keys(), reverse=True):
626 path = path.replace(dirpath, '${%s}' % dirvars[dirpath]) 626 path = path.replace(dirpath, '${%s}' % dirvars[dirpath])