Comment 1 for bug 435837

Revision history for this message
Kai Lautaportti (kai-lautaportti) wrote :

After taking a better look at the zc.buildout code I can see that the +=/-= semantics are implemented in _update_section() function which is called by _open() when configurations are read in. However, the macro expansion is currently done much later by Options._do_extend_raw().

I prototyped a different implementation that expands macros as part of the _open() function before it calls _update_section() which seems to partially solve the issue and make. However, the prototype introduces a regression in the ``tests.increment_on_command_line`` test because the command line overrides are only applied after all the config files have been read (and therefore _update_section() calls have been made and expanding macros is too late).

This has lead me to believe that at the moment it is not possible to fix this issue by simply moving the macro expansion to an earlier stage in the initialization of the buildout.

I would be willing to work on this but would appreciate some guidance as how to best approach this as some restructuring of the configuration reading logic may be needed.