Wednesday, January 9, 2008

VersionConflict in buildout

Today I tried to update my buildout from plone 3.0.4 to 3.0.5. In the relevant section I just changed:
- recipe = plone.recipe.plone==3.0.4
+ recipe = plone.recipe.plone==3.0.5

and re-run buildout, but I got a "VersionConflict" error:

[...]
Uninstalling plone.
While:
Installing.
Uninstalling plone.
Loading recipe 'plone.recipe.plone==3.0.4'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:

VersionConflict:
(plone.recipe.plone 3.0.5 (/home/bmathieu/.buildout/eggs/plone.recipe.plone-3.0.5-py2.4.egg), Requirement.parse('plone.recipe.plone==3.0.4'))

The only way I found to get rid of this is to edit the hidden file named ".installed.cfg", and replace the line:
- recipe = plone.recipe.plone==3.0.4
+ recipe = plone.recipe.plone

Then buildout could finish its job. I don't know if this is clean, but it may help.

2 comments:

tomster said...

FWIW, I usually just delete the entire file whenever I've made major version changes in buildout.cfg. perhaps that's something buildout should do by itself?

Anonymous said...

You can certainly remove the recipe line (along with other two reference lines to plone in 'instance'), then rerun buildout. That will remove the old record. Then add all the lines back without version.

Of course, it would be nice if buildout by itself can understand that we are trying to upgrade.