[Distutils] Buildout: caching of base configuration ('extends')
jim at zope.com
Thu May 28 22:53:48 CEST 2009
On May 28, 2009, at 11:51 AM, Thomas Lotze wrote:
> Jim Fulton <jim at zope.com> schrieb:
>>> - I think buildout should not unconditionally use a cached copy of a
>>> 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
>>> offline mode is active or an attempt at downloading failed.
> 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
>>> are read from either ~/.buildout/default.cfg or buildout.cfg and
>>> 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
>>> and ignore download-cache options in any downloaded base configs.
>>> 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
> 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
> in such an explicit way.
More information about the Distutils-SIG