Mercurial > hg > graal-jvmci-8
comparison mx/mx_graal.py @ 16858:a8af2abc2039
fixed regression in mx causing problems for the SYMLINK_GRAAL_JAR feature
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 19 Aug 2014 09:58:41 +0200 |
parents | 9f5e33cf8d52 |
children | bf499b4d86e9 |
comparison
equal
deleted
inserted
replaced
16857:7bfbad29d331 | 16858:a8af2abc2039 |
---|---|
554 # cause issues if the lib is being updated while | 554 # cause issues if the lib is being updated while |
555 # the VM is running. | 555 # the VM is running. |
556 if not os.path.islink(dstLib) or not os.path.realpath(dstLib) == src: | 556 if not os.path.islink(dstLib) or not os.path.realpath(dstLib) == src: |
557 if exists(dstLib): | 557 if exists(dstLib): |
558 os.remove(dstLib) | 558 os.remove(dstLib) |
559 os.symlink(src, dstLib) | 559 os.symlink(src, dstLib) |
560 else: | 560 else: |
561 # do a copy and then a move to get atomic updating (on Unix) | 561 # do a copy and then a move to get atomic updating (on Unix) |
562 fd, tmp = tempfile.mkstemp(suffix='', prefix=name, dir=dst) | 562 fd, tmp = tempfile.mkstemp(suffix='', prefix=name, dir=dst) |
563 shutil.copyfile(src, tmp) | 563 shutil.copyfile(src, tmp) |
564 os.close(fd) | 564 os.close(fd) |