.installed.cfg can be evil

rm .installed.cfg

In case you experience strange VersionConflicts on your buildout, this might save you some time:

Today i wanted to update a plone3.0 buildout to plone3.1-rc1,
since i needed static portlets in a project and plone.portlet.static does not work on plone3.0 (see http://plone.org/documentation/how-to/creating-static-text-portlets-in-plone-3.0)

I changed the version numbers in the plone recipe:

[plone]
#recipe = plone.recipe.plone>=3.0,<3.1dev
recipe = plone.recipe.plone >=3.1rc1, < 3.2dev

Changing the version number in a fresh buildout worked out fine, but when running bin/buildout on my existing project i got a version conflict:


VersionConflict:
(plone.recipe.plone 3.1-rc1 (.../plone.recipe.plone-3.1_rc1-py2.4.egg), Requirement.parse('plone.recipe.plone>=3.0,<3.1dev'))

The root of all evli was .installed.cfg in my case. This file contains the dependend eggs and their versions.
In a plone3.0 buildout you can find the following line in .installed.cfg:

recipe = plone.recipe.plone>=3.0,<3.1dev

Solution

delete .installed.cfg and run your buildout again.



Update: This is a bug and might be fixed soon.