Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Removed the functionality to set and create a default download-cache directory #9

Merged
merged 1 commit into from

3 participants

@miano

This fixes a bug that would cause some buildouts to fail if the download-cache directory does not exist. This occurs because this recipe altered the download-cache property of a buildout when it is initialized but only created the directory if it did not exist when the part is installed. Other parts that are installed before a part that uses this recipe would fail to download their packages since the download-cache directory does not exist. A simple solution is not to tinker with the download-cache directory at all since zc.buildout adequately handles it.

@miano miano Removed the functionality to set and create a default download-cache …
…directory. This fixes a bug that would cause some buildouts to fail if the download-cache directory does not exist. This occurs because this recipe altered the download-cache property of a buildout when it is initialized but only created the directory if it did not exist when the part is installed. Other parts that are installed before a part that uses this recipe would fail to download their packages since the download-cache directory does not exist. A simple solution is not to tinker with the download-cache directory at all since zc.buildout adequately handles it.
f0931ad
@desaintmartin

I really second this bug fix. It is old bug (#6) not fixed yet officially and it would be really nice to have it merged in order not to fork.

@dokai dokai merged commit 9eeede0 into hexagonit:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 8, 2012
  1. @miano

    Removed the functionality to set and create a default download-cache …

    miano authored
    …directory. This fixes a bug that would cause some buildouts to fail if the download-cache directory does not exist. This occurs because this recipe altered the download-cache property of a buildout when it is initialized but only created the directory if it did not exist when the part is installed. Other parts that are installed before a part that uses this recipe would fail to download their packages since the download-cache directory does not exist. A simple solution is not to tinker with the download-cache directory at all since zc.buildout adequately handles it.
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 6 deletions.
  1. +0 −6 hexagonit/recipe/download/__init__.py
View
6 hexagonit/recipe/download/__init__.py
@@ -21,9 +21,6 @@ def __init__(self, buildout, name, options):
self.options = options
self.buildout = buildout
self.name = name
- buildout['buildout'].setdefault(
- 'download-cache',
- os.path.join(buildout['buildout']['directory'], 'downloads'))
options.setdefault('destination', os.path.join(
buildout['buildout']['parts-directory'],
@@ -73,9 +70,6 @@ def calculate_base(self, extract_dir):
def install(self):
log = logging.getLogger(self.name)
- if not os.path.exists(self.buildout['buildout']['download-cache']):
- os.makedirs(self.buildout['buildout']['download-cache'])
-
destination = self.options.get('destination')
download = Download(self.buildout['buildout'], hash_name=self.options['hash-name'].strip() in TRUE_VALUES)
path, is_temp = download(self.options['url'], md5sum=self.options.get('md5sum'))
Something went wrong with that request. Please try again.