Commit 13e031e2 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

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 8f6e9cec
...@@ -702,7 +702,7 @@ class Buildout(DictMixin): ...@@ -702,7 +702,7 @@ class Buildout(DictMixin):
if part in install_parts: if part in install_parts:
old_options = self.installed_part_options[part].copy() old_options = self.installed_part_options[part].copy()
installed_files = old_options.pop('__buildout_installed__') installed_files = old_options.pop('__buildout_installed__')
new_options = self.get(part) new_options = self.get(part).copy()
if not self.check_signature: if not self.check_signature:
old_signature = old_options.get( old_signature = old_options.get(
'__buildout_signature__', None) '__buildout_signature__', None)
...@@ -957,7 +957,7 @@ class Buildout(DictMixin): ...@@ -957,7 +957,7 @@ class Buildout(DictMixin):
for k, v in _spacey_defaults: for k, v in _spacey_defaults:
value = value.replace(k, v) value = value.replace(k, v)
options[option] = value options[option] = value
result[section] = self.Options(self, section, options) result[section] = self.Options(self, section, options).copy()
return result return result
else: else:
......
...@@ -2135,6 +2135,7 @@ changes, the service shouldn't be changed. ...@@ -2135,6 +2135,7 @@ changes, the service shouldn't be changed.
>>> print_(system(buildout), end='') >>> print_(system(buildout), end='')
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
Updating service. Updating service.
Unused options for service: 'script'.
Now we change the service part to trigger uninstallation and Now we change the service part to trigger uninstallation and
re-installation. re-installation.
......
...@@ -1007,6 +1007,7 @@ Uninstall recipes need to be called when a part is removed too: ...@@ -1007,6 +1007,7 @@ Uninstall recipes need to be called when a part is removed too:
uninstalling uninstalling
Installing demo. Installing demo.
installing installing
Unused options for demo: 'x'.
>>> write('buildout.cfg', ''' >>> 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