This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch valentindavid/flatpak-demo in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit e3756d428adcc31b7554539f795b86cc6ab1fe1f Author: Valentin David <[email protected]> AuthorDate: Fri Jul 6 14:57:07 2018 +0200 Inverse priority of in include composition --- buildstream/_includes.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/buildstream/_includes.py b/buildstream/_includes.py index 3640f7a..2779773 100644 --- a/buildstream/_includes.py +++ b/buildstream/_includes.py @@ -1,4 +1,5 @@ import os +import copy from collections import Mapping from . import _yaml from ._exceptions import LoadError, LoadErrorReason @@ -39,8 +40,16 @@ class Includes: only_local=only_local) finally: included.remove(file_path) - _yaml.composite(node, include_node) + old_node = copy.copy(node) + while True: + try: + node.popitem() + except KeyError: + break + _yaml.composite(node, include_node) + _yaml.composite(node, old_node) + for _, value in _yaml.node_items(node): self._process_value(value, current_loader=current_loader, only_local=only_local)
