Commit 7e773f1d authored by Nicolas Wavrant's avatar Nicolas Wavrant

FIXUP

parent 8053d0af
...@@ -535,6 +535,22 @@ class Buildout(DictMixin): ...@@ -535,6 +535,22 @@ class Buildout(DictMixin):
self._setup_directories() self._setup_directories()
options = self['buildout']
link = options.get('link', "")
shared_path = shared_stack_path(link)
if link and shared_path:
shared_item_set = set(os.listdir(shared_path))
current_item_set = set(os.listdir('.'))
for name in ('bin', 'parts', 'eggs', 'develop-eggs'):
for item in os.listdir(os.path.join(shared_path, name)):
new_item_path = os.path.join(name, item)
if not os.path.exists(new_item_path) and item != 'buildout':
os.symlink(os.path.join(shared_path, name, item), new_item_path)
for item in shared_item_set - current_item_set:
os.symlink(os.path.join(shared_path, item), item)
elif link:
options['extends'] = link
# Now copy buildout and setuptools eggs, and record destination eggs: # Now copy buildout and setuptools eggs, and record destination eggs:
entries = [] entries = []
options = self['buildout'] options = self['buildout']
...@@ -633,6 +649,12 @@ class Buildout(DictMixin): ...@@ -633,6 +649,12 @@ class Buildout(DictMixin):
self.install(()) self.install(())
def install(self, install_args): def install(self, install_args):
options = self['buildout']
link = options.get('link', "")
if link and shared_path:
self._save_installed_options()
return
try: try:
self._install_parts(install_args) self._install_parts(install_args)
finally: finally:
...@@ -1799,16 +1821,17 @@ def _open(base, filename, seen, dl_options, override, downloaded): ...@@ -1799,16 +1821,17 @@ def _open(base, filename, seen, dl_options, override, downloaded):
os.remove(downloaded_filename) os.remove(downloaded_filename)
options = result.get('buildout', {}) options = result.get('buildout', {})
link = options.pop('link', "") # link = options.get('link', "")
shared_path = shared_stack_path(link) # shared_path = shared_stack_path(link)
if link and shared_path: # if link and shared_path:
shared_item_set = set(os.listdir(shared_path)) # shared_item_set = set(os.listdir(shared_path))
current_item_set = set(os.listdir('.')) # current_item_set = set(os.listdir('.'))
for item in shared_item_set - current_item_set: # for item in shared_item_set - current_item_set:
os.symlink(os.path.join(shared_path, item), item) # if item not in ('bin', 'develop-eggs', 'eggs',):
Buildout.install = lambda *args : None # os.symlink(os.path.join(shared_path, item), item)
elif link: # Buildout.install = lambda *args : None
options['extends'] = link # elif link:
# options['extends'] = link
extends = options.pop('extends', None) extends = options.pop('extends', None)
if 'extended-by' in options: if 'extended-by' in options:
......
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