[Distutils] Buildout: caching of base configuration ('extends')

Thomas Lotze thomas at thomas-lotze.de
Thu May 28 17:51:30 CEST 2009

Jim Fulton <jim at zope.com> schrieb:

> > - I think buildout should not unconditionally use a cached copy of a  
> > base
> >  configuration file. While it is sensible in other use cases to never
> >  access the network if a file is found in the cache, base configs can
> >  be expected to change and should IMHO be taken from the cache only  
> > when
> >  offline mode is active or an attempt at downloading failed.
> Absolutely.

I've added the ability to use the cache in this way to the download
API in the meantime.

> > - The download cache to be used is configured as one of the options  
> > that
> >  are read from either ~/.buildout/default.cfg or buildout.cfg and  
> > their
> >  respective bases. In order to keep things simple, I'd suggest to  
> > use a
> >  download cache only if specified directly inside any of these two  
> > files,
> >  and ignore download-cache options in any downloaded base configs.  
> > This
> >  would be an exception to how options read from config files are
> >  combined, but one I deem worthwhile.
> -1 on allowing the settings in only these 2 files.

OK, avoiding these particular special rules is fine with me.

> The solution seems too complicated to me. Too many special rules.
> Maybe there should be a separate settinf for this, like extends-cache  
> or something.

Would it be OK for you to special-case that new option? The problem
that needs to be solved when downloading base configs is that in order
for a particular config file to be taken from the cache if necessary,
the cache location must be known beforehand, so it shouldn't be
possible for the cache location to depend on the contents of the config
file in question. I cannot see another way to achieve this but to read
the extends-cache location from the root config file (either
~/.buildout/default.cfg or buildout.cfg) exclusively.

This wouldn't account for an root config file that is specified to
buildout on the command line and needs to be downloaded itself, but I
think it's OK to assume being online when specifying an online resource
in such an explicit way.

Viele Grüße,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20090528/98c1fcd0/attachment.pgp>

More information about the Distutils-SIG mailing list