diff mx/commands.py @ 6687:a9a50f21e000

Added change to copied directory's protection when source JDK directories are read-only.
author Laurent Daynes <Laurent.Daynes@oracle.com>
date Tue, 23 Oct 2012 17:08:17 +0200
parents ef48be91f5fd
children 806821a1c0a8
line wrap: on
line diff
--- a/mx/commands.py	Mon Oct 22 20:22:50 2012 +0200
+++ b/mx/commands.py	Tue Oct 23 17:08:17 2012 +0200
@@ -348,6 +348,8 @@
                     lines.append(line)
 
             assert defaultVM is not None, 'Could not find default VM in ' + jvmCfg
+            if mx.get_os() != 'windows':
+                os.chmod(_vmLibDirInJdk(jdk), 0755)
             shutil.copytree(join(_vmLibDirInJdk(jdk), defaultVM), join(_vmLibDirInJdk(jdk), defaultVM + '0'))
 
             with open(jvmCfg, 'w') as f:
@@ -461,6 +463,8 @@
 
         vmDir = join(_vmLibDirInJdk(jdk), vm)
         if not exists(vmDir):
+            if mx.get_os() != 'windows':
+                os.chmod(_vmLibDirInJdk(jdk), 0755)
             mx.log('Creating VM directory in JDK7: ' + vmDir)
             os.makedirs(vmDir)