Configuring buildout to prefer stable releases

by Matt Sital-Singh on Nov 17, 2009
Filed Under:

Yesterday morning I came in to work to find that my (previously fine) plone 3 buildout kept failing to rebuild. After much debugging and googling, I tracked it down to the fact that over the weekend a new alpha version of plone.recipe.zope2instance was put up on pypi (4.0a1). Buildout merrily downloaded the new version which, by its own admission, introduces changes which can break plone 3 (see the changelog):

Now, you could argue this is my fault for not pinning my versions. In my defence, I had pinned the majority of versions but had left out major recipes like plone.recipe.zope2instance, assuming they were safe.

The upside to this issue was my discovery of buildout's 'prefer-final' option, which causes it to pick older, final releases over newer, alpha ones. You can add this option to the [buildout] section of your buildout file as follows:

parts = zope2

prefer-final = true

According to the buildout user guide, this option will default to 'true' in future versions of zc.buildout:

Filed under: , ,
Chris Calloway
Chris Calloway says:
Nov 17, 2009 04:24 PM

Excellent tip, mattss!

David Glick
David Glick says:
Nov 17, 2009 08:11 PM

This will deal with the problem until we make a final release of plone.recipe.zope2instance 2.0, but then you'll encounter the same issue (b/c 2.0 is not backwards-compatible with the Plone 3 series). A better solution is to pin plone.recipe.zope2instance with a versions block:

versions = versions

plone.recipe.zope2instance = 3.4

Note that this should already be taken care of in Plone 3.2.x and 3.3.x if your buildout is correctly extending that Plone release's versions.cfg, like so:

extends =

JeanMichel FRANCOIS says:
Nov 18, 2009 09:06 AM

Is the plone.recipe.zope2instance version not fixed in plone3 default buildout ? (

Some eggs are not available in final version like Mysql, Relstorage, and others because some developers doesn't want to be blame with bugs on stable version.

I still prefer fixing versions with buildout.dumppickedversions.

Commenting has now closed on this post.