Imported Upstream version 6.0.0.311

Former-commit-id: 345dd3f106985ed97a93ada1859ac75084d86c14
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-07-02 08:43:34 +00:00
parent 9163dc941b
commit 723be3871f
47 changed files with 53 additions and 43 deletions

View File

@@ -337,8 +337,18 @@ class Package:
return clean_archive
def get_download_dest(url):
return os.path.join(source_cache_dir, os.path.basename(url))
def get_download_dest(url,version):
if version is not None:
dest_dir = '%s-%s' % (self.name, version)
else:
dest_dir = self.name
try:
os.makedirs (os.path.join(source_cache_dir, dest_dir))
except OSError, e:
if e.errno != os.errno.EEXIST:
raise
pass
return os.path.join(source_cache_dir, dest_dir, os.path.basename(url))
def get_git_cache_path():
if self.organization is None:
@@ -370,7 +380,7 @@ class Package:
# raise Exception ('HTTP downloads are no longer allowed: %s', source)
if source.startswith(('http://', 'https://', 'ftp://')):
cache = get_download_dest(source)
cache = get_download_dest(source, self.version)
if self.profile.cache_host is not None:
cached_source = os.path.join(
self.profile.cache_host, os.path.basename(source))