# HG changeset patch # User Doug Simon # Date 1407425537 -7200 # Node ID ad19df13df14b639ea6f9ae48421857cb4cfa79a # Parent 91e7d77cfb81ce94248fef98be7b05b9ff5f7ce0 mx: add support for Java agent libraries that use the Boot-Class-Path manifest attribute to ensure that are loaded by the boot class path loader diff -r 91e7d77cfb81 -r ad19df13df14 mxtool/mx.py --- a/mxtool/mx.py Thu Aug 07 08:04:23 2014 +0200 +++ b/mxtool/mx.py Thu Aug 07 17:32:17 2014 +0200 @@ -503,7 +503,7 @@ d.update(buf) return d.hexdigest() -def download_file_with_sha1(name, path, urls, sha1, sha1path, resolve, mustExist, sources=False): +def download_file_with_sha1(name, path, urls, sha1, sha1path, resolve, mustExist, sources=False, canSymlink=True): def _download_lib(): cacheDir = get_env('MX_CACHE_DIR', join(_opts.user_home, '.mx', 'cache')) if not exists(cacheDir): @@ -520,7 +520,8 @@ d = dirname(path) if d != '' and not exists(d): os.makedirs(d) - if 'symlink' in dir(os): + + if canSymlink and 'symlink' in dir(os): if exists(path): os.unlink(path) os.symlink(cachePath, path) @@ -654,7 +655,9 @@ if includedInJDK and java().javaCompliance >= JavaCompliance(includedInJDK): return None - return download_file_with_sha1(self.name, path, self.urls, self.sha1, sha1path, resolve, not self.optional) + bootClassPathAgent = self.bootClassPathAgent.lower() == 'true' if hasattr(self, 'bootClassPathAgent') else False + + return download_file_with_sha1(self.name, path, self.urls, self.sha1, sha1path, resolve, not self.optional, canSymlink=not bootClassPathAgent) def get_source_path(self, resolve): if self.sourcePath is None: