Commit 781ae408 authored by Xavier Thompson's avatar Xavier Thompson

[tmp] Enable partial += with <= support

parent 30961cdc
......@@ -2311,10 +2311,17 @@ def _update(d1, d2):
if section in d1:
_update_section(d1[section], d2[section])
else:
# In order to process += (and -=) correctly when
# XXX: In order to process += (and -=) correctly when
# <key> = <value> and <key> += <value> are in the same section
# _update_section must be called even when section is not in d1
d1[section] = _update_section({}, d2[section])
# _update_section should be called even when section is not in d1
# Hack: When <= is used in the section, _update_section will be
# called later anyway, so we can avoid calling it now which will
# enable brittle and partial support for += (or -=) with keys that
# come from the <= sections.
# TODO: Either implement += and -= support with <= fully or call
# _update_section systematically and give up <= compatibility.
s2 = d2[section]
d1[section] = s2 if '<' in s2 else _update_section({}, s2)
return d1
def _recipe(options):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment