Quantcast
Channel: Planet Plone - Where Developers And Integrators Write
Viewing all articles
Browse latest Browse all 3535

4teamwork: download.zope.org is down - how to fix buildout

$
0
0

Currently download.zope.org seems to be down. When running a buildout installing Plone this is a problem since the Plone version configs extend from download.zope.org.

Buildout throws an exception because it cannot download the version pinnings:

12345678910111213141516
While:Initializing.Aninternalerroroccuredduetoabugineitherzc.buildoutorinarecipebeingused:Traceback(mostrecentcalllast):File"/Users/jone/projects/python/cache/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py",line1682,inmainuser_defaults,windows_restart,command)...File"/Users/jone/projects/python/buildout.python/parts/opt/lib/python2.7/httplib.py",line776,insendself.connect()File"/Users/jone/projects/python/buildout.python/parts/opt/lib/python2.7/httplib.py",line757,inconnectself.timeout,self.source_address)File"/Users/jone/projects/python/buildout.python/parts/opt/lib/python2.7/socket.py",line571,increate_connectionraiseerrIOError:[Errnosocketerror]timedout

Buildout Extends Cache

Configuring an extends cache can help in such situations, although it is wise to do that before something goes down. The cache will normally try to update the extends. If the update fails it will then take the cached version of the config file. This also allows to run buildout in offline mode (bin/buildout -o) which will not update the cached extends.

You can easily set this up for your machine by creating a ~/.buildout/default.cfg file which will be loaded for every buildout configuration run by this user:

12
[buildout]extends-cache=/home/john/buildout-cache/extends

You also need to create the specified directory:

1
$ mkdir -p /home/john/buildout-cache/extends

When running buildout it will automatically store the downloaded extends in the configuration with a hashed name.

The hash can easily be generated using python:

123
>>>frommd5importmd5>>>md5('http://download.zope.org/zopetoolkit/index/1.0.7/ztk-versions.cfg').hexdigest()'fee93940599fd79bdf7e714f3a706d44'

I’ve uploaded the caches for download.zope.org used when using buildout for Plone 4.2:

https://gist.github.com/jone/5720499

Offline bootstrapping

Since buildout.org, which is required for bootstrapping, is on the same host as download.zope.org it is down too.

You can work around bootstrapping issues by doing an offline bootstrap. For this you need to have another buildout already installed which has the same python and zc.buildout versions. You can use the other buildout for bootstrapping like this:

12
$ cd new/buildout
$ ../path/to/old/buildout/bin/buildout -o bootstrap

This bootstraps the buildout in your working directory with the python / buildout versions of the other buildout. Using the -o flag runs the bootstrap in offline mode.

Contact me if you have questions or need other caches for download.zope.org.


Viewing all articles
Browse latest Browse all 3535

Trending Articles