Maurits van Rees, on 2007-08-21:
> I am having problems understanding how the new upgradeStep
> functionality of GenericSetup works.  Maybe the most important
> question: is there a product that already uses this, so I can look at
> its code as an example?

I did not get any responses yet about this.  I went ahead and added an
upgradeStep to eXtremeManagement, a project management Product for
Plone.  The trunk there is meant for Plone 2.5 and 3.0 but some tabs
are duplicated in 3.0 so I wanted to fix that.  The upgrade step does
this.  The changeset is here:

The central piece of code there is the handler that simply runs all
steps from an extension profile that I added for this upgrade step:

  def from_plone25_to_30(context): 
      # Right, context == portal_setup here. 

Does this way of using upgrade steps look sane?

Like I said in my previous post, there are two things that I do not
quite like about this or that I at least did not expect:

- I need to specify a handler even though I only want to run the
  import steps of a profile, which I now have to do by hand in that

- I need to register an upgrade step *and* an extension profile, which
  feels double to me and which adds another profile to the list of
  extension profiles, which gets longer and longer.

I hope I do not sound too much as only complaining.  These upgrade
steps form a good foundation.  I just feel some parts are missing or
have room for improvement.  If other people feel the same way I do not
mind putting some code where my mouth is. :)

Or if I misunderstood how best to use upgrade steps, feel free to
enlighten me.


Maurits van Rees | [NL]
            Work |
"Do not worry about your difficulties in computers,
 I can assure you mine are still greater."

Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to