This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Script installation failures
Type: Stage:
Components: Distutils Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: fdrake Nosy List: dubois, fdrake, tim.peters
Priority: normal Keywords:

Created on 2001-04-06 15:21 by dubois, last changed 2022-04-10 16:03 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bug_details.txt dubois, 2001-08-05 17:32 text file containing details of bug 414316
Messages (6)
msg4194 - (view) Author: Paul F. Dubois (dubois) (Python triager) Date: 2001-04-06 15:21
The "scripts" feature installs scripts with no write 
permission. This is a good thing. But when copying 
scripts down into build/scripts or installing into the 
target python, there are failures because distutils 
does not have write permission on the target when it 
has been previously installed. I assume attempts to 
uninstall are going to have similar difficulties.

In a related matter, we have had to create 
an "artificial user", which is a big pain, who owns 
the files installed because Distutils doesn't work 
right when the file has group write but is owned by 
another developer.
msg4195 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2001-04-07 20:04
Logged In: YES 
user_id=31435

Assigned to Greg Ward.
msg4196 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2001-08-04 03:54
Logged In: YES 
user_id=3066

Assigned to me, since Paul has asked me about this and I
don't want to keep that mail in my inbox forever.

Paul, please tell me exactly what you're seeing:  what
permissions are set on the file in the source directory,
what's the umask you're using, and what are the final
permissions of the installed file.  The only thing that the
install_scripts command appears to be doing is ensuring that
the executable bit is set.

Is the "group-sticky" bit set in the destination directory?
 How do the identities of the installer relate to the
owner/group of the destination directory?
msg4197 - (view) Author: Paul F. Dubois (dubois) (Python triager) Date: 2001-08-05 17:32
Logged In: YES 
user_id=5550

Attached is a file with the details on the report.
msg4198 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2001-08-05 17:58
Logged In: YES 
user_id=3066

Paul,

I think I see what's happening.  In distutils/command/build_scripts.py, at the end of the copy_scripts() method, there is a call to self.copy_file().  You should be able to add a keyword parameter preserve_mode=0 to that to fix this.  If that is not sufficient, please let me know.  (The existing build and installation of your package will need to have the write bit enabled before this will work, unfortunately, but this should take care of future installations.)

Please report your results, and I'll get this checked in if it is sufficient.  Thanks!
msg4199 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2001-08-09 20:34
Logged In: YES 
user_id=3066

Paul, have you had a chance to look at my proposed fix?

I'm marking this as "pending" for now.  It will be
automatically reopened when you respond.
History
Date User Action Args
2022-04-10 16:03:56adminsetgithub: 34290
2001-04-06 15:21:01duboiscreate