Commit 693249e0 authored by Julien Muchembled's avatar Julien Muchembled

Fix a bug in $$ escape handling

That caused uninstall and install everytime for a part containing $$ in its
saved options. Also it caused broken .installed.cfg in case of error, like the
referenced section was not defined.
parent 2c6a9cd2
......@@ -735,6 +735,7 @@ class Buildout(UserDict.DictMixin):
new_options['__buildout_signature__'] = old_signature
else:
del(new_options['__buildout_signature__'])
new_options = new_options.copy()
if old_options == new_options:
# The options are the same, but are all of the
# installed files still there? If not, we should
......@@ -821,9 +822,9 @@ class Buildout(UserDict.DictMixin):
saved_options['__buildout_installed__'] = installed_files
saved_options['__buildout_signature__'] = signature
installed_part_options[part] = saved_options
part in installed_parts or installed_parts.append(part)
_check_for_unused_options_in_section(self, part)
if part not in installed_parts:
installed_parts.append(part)
_check_for_unused_options_in_section(self, part)
finally:
installed_path = self['buildout']['installed']
......
......@@ -1021,6 +1021,7 @@ Uninstall recipes need to be called when a part is removed too:
uninstalling
Installing demo.
installing
Unused options for demo: 'x'.
>>> write('buildout.cfg', '''
......
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