Tarek Ziadé <ziade.ta...@gmail.com> added the comment:

> I believe that the default behavior should be changed to preserve 
> all permissions, with the possible exception of setting u+w. 
> Even that might be unnecessary; AFAIK to delete a file you need 
> write permissions only to its parent directory, not to the 
> file itself.

The u+w setting could also be done on the fly by copy_file at
installation time. e.g. when overwriting a read-only file.


> In my case, some 
>  executable files ceased to be executable after installation.

what is your use case of having executable file here ?

I'd use the 'scripts' metadata for that ?


> Even if the current behavior is deemed correct, at the very least 
> the code should be refactored to allow easy overriding.
> Currently build_module and build_package_data pass 
> preserve_mode=False in their
> body, so I had to copy and paste the whole methods 
> just to set preserve_mode=True.

But How do you handle the overwrite of a read-only file in your code then ?

----------
versions: +Python 2.7, Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5300>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to