From 8f9bbb7022903435b36ec0a92c0fe4501e346c48 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier Date: Mon, 20 Feb 2012 17:59:50 +0100 Subject: [RFC 1/2] Allow extending more than once sections extending other sections. --- src/zc/buildout/buildout.py | 1 + src/zc/buildout/tests.py | 46 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 0 deletions(-) diff --git a/src/zc/buildout/buildout.py b/src/zc/buildout/buildout.py index c733a26..0efb522 100644 --- a/src/zc/buildout/buildout.py +++ b/src/zc/buildout/buildout.py @@ -1197,6 +1197,7 @@ class Options(UserDict.DictMixin): result.update(self._do_extend_raw(iname, raw, doing)) result.update(data) + data.update(result) return result finally: assert doing.pop() == name diff --git a/src/zc/buildout/tests.py b/src/zc/buildout/tests.py index 9bab789..5508068 100644 --- a/src/zc/buildout/tests.py +++ b/src/zc/buildout/tests.py @@ -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): -- 1.7.8.3