enthought / enstaller

Default Repo description from terraform module
Other
0 stars 0 forks source link

BUGFIX: Permission Denied when replacing a symlink with a file #12

Open JoelB opened 9 years ago

JoelB commented 9 years ago

When replacing a symlink object with a file object, enstaller will fail with 'Permission Denied' if the link target is in the system Canopy installation. This change checks if the target for a file write is a symlink and unlinks it if necessary.

EDIT: For clarity, this problem happened for a fresh install of Canopy 1.5.2 when a user attempted to install the zeromq package. By default, the file $CANOPY_PATH/bin/curve_keygen is a symlink to the system version of curve_keygen at "/appdata/canopy-1.5.1.2730.rh5-x86_64/bin/curve_keygen". When a user attempts to install zeromq with enpkg, they receive this error:

[...] File "/mnt/data/localadmin/pkgs/enthought/canopy-1.5.2/lib/python2.7/site-packages/egginst/_zipfile.py", line 97, in _extract_member_to with open(targetpath, "wb") as target: IOError: [Errno 13] Permission denied: '/mnt/data/localadmin/pkgs/enthought/canopy-1.5.2/bin/curve_keygen'

_extract_member_to is trying to open the the symlink target (in /opt) instead of removing the symlink and creating a local copy.

coveralls commented 9 years ago

Coverage Status

Changes Unknown when pulling 85a27cee00799fabd10a141061093e87b6db81cd on JoelB:master into \ on enthought:master**.

coveralls commented 9 years ago

Coverage Status

Changes Unknown when pulling 85a27cee00799fabd10a141061093e87b6db81cd on JoelB:master into \ on enthought:master**.