summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildstream/element.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index a243826ed..f7b226cdd 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -2108,11 +2108,14 @@ class Element(Plugin):
}
self.__cache_key_dict['fatal-warnings'] = sorted(project._fatal_warnings)
+ self.__cache_key_dict['dependencies'] = []
+ self.__cache_key_dict = _yaml.node_sanitize(self.__cache_key_dict)
- cache_key_dict = self.__cache_key_dict.copy()
- cache_key_dict['dependencies'] = dependencies
+ # This replacement is safe since OrderedDict replaces the value,
+ # leaving its location in the dictionary alone.
+ self.__cache_key_dict['dependencies'] = _yaml.node_sanitize(dependencies)
- return _cachekey.generate_key(cache_key_dict)
+ return _cachekey.generate_key_pre_sanitized(self.__cache_key_dict)
# __can_build_incrementally()
#