No bug - Don't chmod before deleting target in nsinstall.py on non Windows to avoid touching CLOBBER on a CLOSED TREE
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 25 Jul 2014 09:01:23 +0900
changeset 196080 b0a916157c9a924b6887fdd1a2c9d8413f037648
parent 196079 0300f04572b6a6d1ad192acd1608da0dd8cc1ba5
child 196081 de374e83ed83b5d028c98a808f019f5e1c744167
push id27205
push userkwierso@gmail.com
push dateFri, 25 Jul 2014 22:59:38 +0000
treeherdermozilla-central@e07264876182 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
No bug - Don't chmod before deleting target in nsinstall.py on non Windows to avoid touching CLOBBER on a CLOSED TREE
config/nsinstall.py
--- a/config/nsinstall.py
+++ b/config/nsinstall.py
@@ -122,17 +122,18 @@ def _nsinstall_internal(argv):
         entries = [os.path.join(srcpath, e) for e in os.listdir(srcpath)]
         copy_all_entries(entries, targetpath)
         # options.t is not relevant for directories
         if options.m:
           os.chmod(targetpath, options.m)
       else:
         if os.path.exists(targetpath):
           # On Windows, read-only files can't be deleted
-          os.chmod(targetpath, stat.S_IWUSR)
+          if sys.platform == "win32":
+            os.chmod(targetpath, stat.S_IWUSR)
           os.remove(targetpath)
         if options.t:
           shutil.copy2(srcpath, targetpath)
         else:
           shutil.copy(srcpath, targetpath)
 
   # the last argument is the target directory
   target = args.pop()