'download-cache' option should create a path if necessary

Bug #328707 reported by Tim Molendijk on 2009-02-12
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

Buildout fails if the 'download-cache' option specifies a non-existent path. It does not create it if necessary, nor does it give one of its parts a chance to do so. This is not a problem if we want a shared system path the be the download cache, but if we want to use a local private download cache (i.e. below ${buildout:directory}) this is terribly annoying because it basically means that this directory needs to be created manually every time a new buildout is deployed. Welcome back INSTALL.txt!

Brandon Rhodes (brandon-rhodes) wrote :

This causes problems not only for caches under the buildout itself, but even for more modest attempts to avoid hours of repeated downloads, like setting the download directory to ~/.buildout/cache to mirror the way that buildout treats ~/.buildout/eggs.

Guy Rozendorn (guy-rozendorn) wrote :

In the patch suggested,
buildout will recursively create the cache directory if the path does not exist, by using calling os.makedir, which will raise an exception in case of write error.

In case the path exists but its a file a directory, a proper error message will be printed to the user.

Guy Rozendorn (guy-rozendorn) wrote :


A month has almost passed since I uploaded the patch.
Can someone please review it and merge it to the source?

Jim Fulton (jim-zope) wrote :

Two things:

- It needs a test. :) (Or it needs to update a test if the change
  would cause a test to break.)

- I'm -1 on automaticaly creating the download cache, in general,
  especially with makedirs. I'm willing to compromise. :)

  I'm willing to create the directory if it's in ~/.buildout or in
  buildout-directory. I strongly prefer that it be created only if
  it's imediately in one of these (iow, use mkdir).

Domen Kožar (ielectric+) wrote :
Changed in zc.buildout:
status: New → Confirmed
importance: Undecided → Wishlist
importance: Wishlist → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers