[Grok-dev] syncing versions.cfg in grokcore.* family

Maurits van Rees m.van.rees at zestsoftware.nl
Thu Sep 17 18:51:42 EDT 2009


Martijn Faassen, on 2009-09-17:
> Reinout van Rees wrote:
>> On 2009-09-17, Hanno Schlichting <hanno at hannosch.eu> wrote:
>>> On Thu, Sep 17, 2009 at 2:52 PM, Reinout van Rees <reinout at vanrees.org> wrote:
>>>> Sounds like an "extends=http://somewhere.else" which prevents you from running
>>>> buildout when you don't have an internet connection?
>>>>
>>>> Or has this been fixed in recent buildouts?
>>> I think Thomas Lotze worked on this as part of his "download cache
>>> API", which is part of buildout 1.4 IIRC.
>> 
>> I see it now in 1.4.0's changelog: "Used the download API to allow caching of
>> base configurations (specified by the buildout section's 'extends' option)."
>> 
>> Hurray, this really is a great help!
>
> I didn't know that this existed. Perhaps you can describe how this would 
> help us?

Take this short buildout.cfg:

[buildout]
parts =
extends = http://dist.plone.org/release/3.2.1/versions.cfg
extends-cache = configs

Now create the 'configs' dir, run python bootstrap.py and
bin/buildout.  The versions.cfg taken from dist.plone.org is now
cached in the configs directory (the name of the file is the md5sum of
the url).

Now run buildout in offline mode: 'bin/buildout -o'.  Buildout
finishes correctly.  Without extends-cache you would get an error:

$ bin/buildout -o
While:
  Initializing.
Error: Couldn't download
'http://dist.plone.org/release/3.2.1/versions.cfg' in offline mode.


Second test: bring dist.plone.org down. :-) Remove your internet cable
or let dist.plone.org point somewhere else in /etc/hosts or something
like that.  Run bin/buildout.  Buildout finishes correctly.  Without
extends-cache you would get an error:

$ bin/buildout
While:
  Initializing.
...
IOError: [Errno socket error] (113, 'No route to host')

This works from zc.buildout 1.4.0 onwards.

Sounds useful.

-- 
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]



More information about the Grok-dev mailing list