# HG changeset patch # User Laurent Daynes # Date 1351076362 -7200 # Node ID 806821a1c0a8395309d14e01340d82bb08d7bde3 # Parent a9a50f21e0009c2166facab956005d13c77d2035 Make sure files in copy of JDK has write-protection unset before modifying it. diff -r a9a50f21e000 -r 806821a1c0a8 mx/commands.py --- a/mx/commands.py Tue Oct 23 17:08:17 2012 +0200 +++ b/mx/commands.py Wed Oct 24 12:59:22 2012 +0200 @@ -350,6 +350,7 @@ assert defaultVM is not None, 'Could not find default VM in ' + jvmCfg if mx.get_os() != 'windows': os.chmod(_vmLibDirInJdk(jdk), 0755) + os.chmod(jvmCfg, 0755) shutil.copytree(join(_vmLibDirInJdk(jdk), defaultVM), join(_vmLibDirInJdk(jdk), defaultVM + '0')) with open(jvmCfg, 'w') as f: @@ -569,6 +570,8 @@ if not found: mx.log('Appending "' + prefix + ' KNOWN" to ' + jvmCfg) lines.append(vmKnown) + if mx.get_os() != 'windows': + os.chmod(jvmCfg, 0755) with open(jvmCfg, 'w') as f: for line in lines: f.write(line)