Commit e837aff8 authored by Nicolas Wavrant's avatar Nicolas Wavrant

WIP

parent 7e773f1d
...@@ -652,6 +652,7 @@ class Buildout(DictMixin): ...@@ -652,6 +652,7 @@ class Buildout(DictMixin):
options = self['buildout'] options = self['buildout']
link = options.get('link', "") link = options.get('link', "")
if link and shared_path: if link and shared_path:
os.environ.set('BUILDOUT_HOME', shared_path)
self._save_installed_options() self._save_installed_options()
return return
...@@ -666,6 +667,7 @@ class Buildout(DictMixin): ...@@ -666,6 +667,7 @@ class Buildout(DictMixin):
if self.show_picked_versions or self.update_versions_file: if self.show_picked_versions or self.update_versions_file:
self._print_picked_versions() self._print_picked_versions()
self._unload_extensions() self._unload_extensions()
os.environ.set('BUILDOUT_HOME', os.curdir)
def _install_parts(self, install_args): def _install_parts(self, install_args):
__doing__ = 'Installing.' __doing__ = 'Installing.'
...@@ -956,6 +958,10 @@ class Buildout(DictMixin): ...@@ -956,6 +958,10 @@ class Buildout(DictMixin):
def _read_installed_part_options(self): def _read_installed_part_options(self):
old = self['buildout']['installed'] old = self['buildout']['installed']
link = options.get('link', "")
new_path = os.curdir
shared_path = shared_stack_path(link)
if old and os.path.isfile(old): if old and os.path.isfile(old):
fp = open(old) fp = open(old)
sections = zc.buildout.configparser.parse(fp, old) sections = zc.buildout.configparser.parse(fp, old)
...@@ -967,7 +973,7 @@ class Buildout(DictMixin): ...@@ -967,7 +973,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.replace(shared_path, new_path))
return result return result
else: else:
......
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