Commit f9701613 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fixup! Support on the fly patches in easy_install.

Before, the same file name was used for temporary download of several
patches. But download function uses a hard link for a patch using
whose schema is file:, thus download of the second patch broke the
original file of the first patch.
parent 0396408b
...@@ -1216,11 +1216,11 @@ class Installer: ...@@ -1216,11 +1216,11 @@ class Installer:
if patch_dict: if patch_dict:
tag_build += '+%s%03d' % (PATCH_MARKER, tag_build += '+%s%03d' % (PATCH_MARKER,
patch_dict['patch_revision']) patch_dict['patch_revision'])
for patch in patch_dict['patches']: for i, patch in enumerate(patch_dict['patches']):
url, md5sum = (patch.strip().split('#', 1) + [''])[:2] url, md5sum = (patch.strip().split('#', 1) + [''])[:2]
download = zc.buildout.download.Download() download = zc.buildout.download.Download()
path, is_temp = download(url, md5sum=md5sum or None, path, is_temp = download(url, md5sum=md5sum or None,
path=os.path.join(tmp, 'patch')) path=os.path.join(tmp, 'patch.%s' % i))
args = [patch_dict['patch_binary']] + patch_dict['patch_options'] args = [patch_dict['patch_binary']] + patch_dict['patch_options']
kwargs = {'cwd':base, kwargs = {'cwd':base,
'stdin':open(path)} 'stdin':open(path)}
......
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