[Distutils] [zc.buildout] upgrade with changed explicit recipe version

Jim Fulton jim at zope.com
Wed Apr 2 21:54:58 CEST 2008


On Apr 2, 2008, at 3:44 PM, Hanno Schlichting wrote:
> Hi.
>
> I ran into a problem with zc.buildout while upgrading a customers
> buildout and wondered if the problem I encountered is a general one.
>
> The buildout in question had one recipe pinned down to an exact  
> version
> as in:
>
> [buildout]
> parts =
>     plone
>
> [plone]
> recipe = plone.recipe.plone==3.0.2
>
> To upgrade this environment I changed the explicit version to 3.0.6:
>
> [buildout]
> parts =
>     plone
>
> [plone]
> recipe = plone.recipe.plone==3.0.6
>
> When rerunning the buildout script I got an error during uninstall of
> the plone part. It complained that the plone.recipe.plone recipe  
> version
> 3.0.2 was not available.
>
> From my understanding of this, buildout parses the version  
> requirements
> first and at the point where it wants to uninstall the plone part,  
> only
> the newer 3.0.6 version of the recipe is available.
>
> The workaround was to change .installed.cfg and remove the version
> restriction, so any version of the recipe would be accepted to  
> uninstall
> the part, but I wonder if there is a general problem here or if we are
> misusing the version restrictions?

I think there is a general problem and no, you aren't miss-using the  
the version restriction.

> I have the feeling that buildout should either add the old recipe to  
> the
> environment to satisfy the uninstall requirement

Unfortunately, there can be only one version in the environment at a  
time.

> or accept newer
> versions of a recipe to uninstall older versions.

That is probably better.

Another option might be to uninstall in a separate process. (Just  
thinking out loud.)

> Thoughts?


I need to think about this. :)

I haven't seen this situation before, although I should have expected  
it.

I'll think about this and respond in a day or 2.  If I forget, bug me,  
or create a launchpad issue.

Jim

--
Jim Fulton
Zope Corporation




More information about the Distutils-SIG mailing list