[Python-bugs-list] [ python-Bugs-414316 ] Script installation failures

noreply@sourceforge.net noreply@sourceforge.net
Thu, 09 Aug 2001 13:34:58 -0700


Bugs item #414316, was opened at 2001-04-06 08:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=414316&group_id=5470

Category: Distutils
Group: None
>Status: Pending
Resolution: None
Priority: 5
Submitted By: Paul F. Dubois (dubois)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Script installation failures

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-08-09 13:34

Message:
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.

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-08-05 10:58

Message:
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!

----------------------------------------------------------------------

Comment By: Paul F. Dubois (dubois)
Date: 2001-08-05 10:32

Message:
Logged In: YES 
user_id=5550

Attached is a file with the details on the report.

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-08-03 20:54

Message:
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?

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-04-07 13:04

Message:
Logged In: YES 
user_id=31435

Assigned to Greg Ward.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=414316&group_id=5470