[oe-commits] Richard Purdie : lib/oe/recipeutils: Ensure order of data store doesn' t influence the result
git at git.openembedded.org
git at git.openembedded.org
Fri Jul 10 14:12:06 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: 85010e611665e2c5bd47e3ec8d1d7fcb602b68a1
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=85010e611665e2c5bd47e3ec8d1d7fcb602b68a1
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date: Fri Jul 10 14:11:16 2015 +0100
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 at linuxfoundation.org>
---
meta/lib/oe/recipeutils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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])
More information about the Openembedded-commits
mailing list