Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
6569:dcad13b2f6e8 | 6687:a9a50f21e000 |
---|---|
346 defaultVM = parts[0][1:] | 346 defaultVM = parts[0][1:] |
347 lines.append('-' + defaultVM + '0 KNOWN\n') | 347 lines.append('-' + defaultVM + '0 KNOWN\n') |
348 lines.append(line) | 348 lines.append(line) |
349 | 349 |
350 assert defaultVM is not None, 'Could not find default VM in ' + jvmCfg | 350 assert defaultVM is not None, 'Could not find default VM in ' + jvmCfg |
351 if mx.get_os() != 'windows': | |
352 os.chmod(_vmLibDirInJdk(jdk), 0755) | |
351 shutil.copytree(join(_vmLibDirInJdk(jdk), defaultVM), join(_vmLibDirInJdk(jdk), defaultVM + '0')) | 353 shutil.copytree(join(_vmLibDirInJdk(jdk), defaultVM), join(_vmLibDirInJdk(jdk), defaultVM + '0')) |
352 | 354 |
353 with open(jvmCfg, 'w') as f: | 355 with open(jvmCfg, 'w') as f: |
354 for line in lines: | 356 for line in lines: |
355 f.write(line) | 357 f.write(line) |
459 | 461 |
460 jdk = _jdk(build, create=True) | 462 jdk = _jdk(build, create=True) |
461 | 463 |
462 vmDir = join(_vmLibDirInJdk(jdk), vm) | 464 vmDir = join(_vmLibDirInJdk(jdk), vm) |
463 if not exists(vmDir): | 465 if not exists(vmDir): |
466 if mx.get_os() != 'windows': | |
467 os.chmod(_vmLibDirInJdk(jdk), 0755) | |
464 mx.log('Creating VM directory in JDK7: ' + vmDir) | 468 mx.log('Creating VM directory in JDK7: ' + vmDir) |
465 os.makedirs(vmDir) | 469 os.makedirs(vmDir) |
466 | 470 |
467 def filterXusage(line): | 471 def filterXusage(line): |
468 if not 'Xusage.txt' in line: | 472 if not 'Xusage.txt' in line: |