Commit cd65eff8 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 c07aaaf6
......@@ -702,7 +702,7 @@ class Buildout(DictMixin):
if part in install_parts:
old_options = self.installed_part_options[part].copy()
installed_files = old_options.pop('__buildout_installed__')
new_options = self.get(part)
new_options = self.get(part).copy()
if not self.check_signature:
old_signature = old_options.get(
'__buildout_signature__', None)
......@@ -957,7 +957,7 @@ class Buildout(DictMixin):
for k, v in _spacey_defaults:
value = value.replace(k, v)
options[option] = value
result[section] = self.Options(self, section, options)
result[section] = self.Options(self, section, options).copy()
return result
else:
......
......@@ -2050,6 +2050,7 @@ changes, the service shouldn't be changed.
>>> print_(system(buildout), end='')
Develop: '/sample-buildout/recipes'
Updating service.
Unused options for service: 'script'.
Now we change the service part to trigger uninstallation and
re-installation.
......
......@@ -1007,6 +1007,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