[Python-checkins] CVS: python/dist/src/Lib/distutils/command install_scripts.py,1.10,1.10.26.1

Michael Hudson mwh@users.sourceforge.net
Fri, 22 Feb 2002 05:19:56 -0800


Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory usw-pr-cvs1:/tmp/cvs-serv14034

Modified Files:
      Tag: release22-maint
	install_scripts.py 
Log Message:
backport akuchling's checkin of
    revision 1.11 of install_scripts.py

Restrict the mode to the lowest four octal positions; higher positions
   contain the type of the file (regular file, socket, link, &c.).
   This means that install_scripts will now print
   "changing mode of <file> to 775" instead of "... to 100775".

2.2 bugfix candidate, I suppose, though this isn't actually fixing a bug.

This patch was applied by an alarmingly automated system -- I hope it 
worked...


Index: install_scripts.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_scripts.py,v
retrieving revision 1.10
retrieving revision 1.10.26.1
diff -C2 -d -r1.10 -r1.10.26.1
*** install_scripts.py	30 Sep 2000 18:27:54 -0000	1.10
--- install_scripts.py	22 Feb 2002 13:19:54 -0000	1.10.26.1
***************
*** 51,55 ****
                      self.announce("changing mode of %s" % file)
                  else:
!                     mode = (os.stat(file)[ST_MODE]) | 0111
                      self.announce("changing mode of %s to %o" % (file, mode))
                      os.chmod(file, mode)
--- 51,55 ----
                      self.announce("changing mode of %s" % file)
                  else:
!                     mode = ((os.stat(file)[ST_MODE]) | 0111) & 07777
                      self.announce("changing mode of %s to %o" % (file, mode))
                      os.chmod(file, mode)