Mercurial > hg > truffle
changeset 13919:9d70445ea369
mx: set correct permissions for graal.jar
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Mon, 10 Feb 2014 13:51:20 +0100 |
parents | 22bf5a8ba9eb |
children | 848b50624671 |
files | mx/mx_graal.py |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mx/mx_graal.py Mon Feb 10 03:39:21 2014 +0000 +++ b/mx/mx_graal.py Mon Feb 10 13:51:20 2014 +0100 @@ -81,6 +81,8 @@ _minVersion = mx.VersionSpec('1.7.0_04') +JDK_UNIX_PERMISSIONS = 0755 + def _get_vm(): """ Gets the configured VM, presenting a dialogue if there is no currently configured VM. @@ -324,7 +326,7 @@ assert defaultVM is not None, 'Could not find default VM in ' + jvmCfg if mx.get_os() != 'windows': - chmodRecursive(jdk, 0755) + chmodRecursive(jdk, JDK_UNIX_PERMISSIONS) shutil.move(join(_vmLibDirInJdk(jdk), defaultVM), join(_vmLibDirInJdk(jdk), 'original')) @@ -402,7 +404,9 @@ fd, tmp = tempfile.mkstemp(suffix='', prefix='graal.jar', dir=jreLibDir) shutil.copyfile(graalJar, tmp) os.close(fd) - shutil.move(tmp, join(jreLibDir, 'graal.jar')) + graalJar = join(jreLibDir, 'graal.jar') + shutil.move(tmp, graalJar) + os.chmod(graalJar, JDK_UNIX_PERMISSIONS) # run a command in the windows SDK Debug Shell def _runInDebugShell(cmd, workingDir, logFile=None, findInOutput=None, respondTo=None): @@ -568,7 +572,7 @@ vmDir = join(_vmLibDirInJdk(jdk), vm) if not exists(vmDir): if mx.get_os() != 'windows': - chmodRecursive(jdk, 0755) + chmodRecursive(jdk, JDK_UNIX_PERMISSIONS) mx.log('Creating VM directory in JDK7: ' + vmDir) os.makedirs(vmDir) @@ -685,7 +689,7 @@ if not found: mx.log('Appending "' + prefix + 'KNOWN" to ' + jvmCfg) if mx.get_os() != 'windows': - os.chmod(jvmCfg, 0755) + os.chmod(jvmCfg, JDK_UNIX_PERMISSIONS) with open(jvmCfg, 'w') as f: for line in lines: if line.startswith(prefix):