Commit 2f517b7d authored by Vincent Pelletier's avatar Vincent Pelletier

Allow extending more than once sections extending other sections.

parent 1a2d9c89
......@@ -1153,6 +1153,7 @@ class Options(UserDict.DictMixin):
if '<' in self._raw:
self._raw = self._do_extend_raw(name, self._raw, [])
self._raw.pop('<')
# force substitutions
for k, v in self._raw.items():
......@@ -1181,7 +1182,7 @@ class Options(UserDict.DictMixin):
raise zc.buildout.UserError("Infinite extending loop %r" % name)
doing.append(name)
try:
to_do = data.pop('<', None)
to_do = data.get('<', None)
if to_do is None:
return data
__doing__ = 'Loading input sections for %r', name
......
......@@ -3587,6 +3587,52 @@ def increment_on_command_line():
recipe='zc.buildout:debug'
"""
def bug_605017_reuse_extending_section():
r"""
>>> write('buildout.cfg', '''
... [buildout]
... parts = myfiles
... myfiles2
...
... [debug]
... recipe = zc.buildout:debug
...
... [with_file1]
... <= debug
... file1 = ${:path}/file1
... color = red
...
... [with_file2]
... <= debug
... file2 = ${:path}/file2
... color = blue
...
... [myfiles]
... <= with_file1
... with_file2
... path = mydata
...
... [myfiles2]
... <= with_file1
... with_file2
... path = mydata2
... ''')
>>> print system(buildout),
Installing myfiles.
color='blue'
file1='mydata/file1'
file2='mydata/file2'
path='mydata'
recipe='zc.buildout:debug'
Installing myfiles2.
color='blue'
file1='mydata2/file1'
file2='mydata2/file2'
path='mydata2'
recipe='zc.buildout:debug'
"""
######################################################################
def make_py_with_system_install(make_py, sample_eggs):
......
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