Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/bockbuild.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Christoforides <alexis@thenull.net>2019-07-01 19:24:03 +0300
committerGitHub <noreply@github.com>2019-07-01 19:24:03 +0300
commit2a05159231cd8defe43b55c72bfaf83279ae0ed3 (patch)
tree5fdd9833adfa7318d4c75f9bc7092e99b877a070
parente623c98cd8d5b8195a995c646776777f91e97c81 (diff)
parentf8e26cc975d52ee166a156b9c15d7e83b42d200d (diff)
Merge pull request #100 from mono/fix-gh-14957
Fix https://github.com/mono/mono/issues/14957
-rw-r--r--bockbuild/package.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/bockbuild/package.py b/bockbuild/package.py
index 84a66b1..08a388d 100644
--- a/bockbuild/package.py
+++ b/bockbuild/package.py
@@ -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))