Rob Miller, on 2008-05-20:
> it's maybe worth mentioning here that i _have_ recently started
> using GS's upgrade machinery, and have been quite happy with it.
> the one thing that i've missed, which i'd like to add to the GS core
> if there's no strong objection, is the ability to easily register
> re-running a particular import step as a part of an upgrade path.
> i propose introducing <genericsetup:upgradeRerunImportStep>, which
> could be used as a standalone tag or nested within the grouping
> defined by a <genericsetup:upgradeSteps> tag.  it would function
> similarly to a regular upgrade step, except instead of running an
> arbitrary callable handler, it would rerun a registered import step
> within the context of the profile with which the step is registered.
> it would also support an optional boolean purge attribute, which would be 
> passed in to the import step execution as the purge argument.
> a sample usage might look like this:
><configure xmlns="";
>             xmlns:genericsetup="";>
>    <genericsetup:upgradeSteps
>       profile="PACKAGE_NAME:default"
>       source="1.0"
>       destination="1.1"
>       sortkey="10">
>      <genericsetup:upgradeRerunImportStep
>         stepid="typeinfo" />
>      <genericsetup:upgradeRerunImportStep
>         stepid="workflow"
>         purge="True" />
>      <genericsetup:upgradeStep
>         title="Do something special"
>         description="Does something special"
>         handler=".upgrades.do_something_special"
>         />
>    </genericsetup:upgradeSteps>

And where are the original typeinfo and workflow upgrade steps
defined?  Are they in some other zcml file of your product?  Or would
they be general upgradesteps defined by GenericSetup, available for
any products?

I *could* imagine for example a general workflow upgrade step that
reapplies the security settings based on some new workflow settings
that your product has just defined.  Although really that could be
done like this, without needing to define a new zcml directive:

       title="Workflow upgrade for my product"
       description="Same here"

So GenericSetup would then define some default upgrade handlers, just
like it defines some export/import handlers.

Would that suit your use case or are you thinking of something else?

Maurits van Rees |
            Work |
"This is your day, don't let them take it away." [Barlow Girl]

Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to