[Distutils] Buildout: caching of base configuration ('extends')
Jim Fulton
jim at zope.com
Thu May 28 15:07:46 CEST 2009
On May 27, 2009, at 8:56 AM, Thomas Lotze wrote:
> Hi,
>
> I've been implementing a download API for buildout and have reached
> the
> point where I'd like to try using it for downloading the base config
> files
> referenced from a buildout config by the 'extends' option. This
> would have
> the benefit of allowing to cache those config files and being able
> to run
> a buildout using that feature while being offline.
>
> However, I'd like to discuss two points about doing this:
>
> - 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.
> - 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.
> I'd allow for configuring and using different download caches in
> those
> two files, though. That way, bases of the user's default config can
> be
> cached centrally while allowing to keep project-related stuff in a
> different place.
>
> Opinions?
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.
Jim
--
Jim Fulton
Zope Corporation
More information about the Distutils-SIG
mailing list