Martin Aspeli wrote, > I am creating a zope 3 style product with this and it seems like there are >> no setup handlers to manage a reinstall of a product. Is this correct? I >> have methods registered in the "import_steps.xml" file, but haven't figured >> out how to register handlers for before the local utility is reinstalled. >> > > What do you want to do with a custom handler? >
I wanted to grab the info in the local utility before it was uninstalled and set the values back on install. Martin Aspeli wrote, > I think the problem is in Products.GenericSetup.components - in > _initUtilities it does > > elif factory is not None: > self.context.registerUtility(factory(), provided, name) > > without first checking of a utility with this name for this interface > already exists. > This is not the problem. I stepped through the code and at this point, the component is no longer registered. I'll post to zope-cmf and see what I come up with. Thanks On Fri, Jun 13, 2008 at 5:25 PM, Martin Aspeli <[EMAIL PROTECTED]> wrote: > Nathan Van Gheem wrote: > >> Certainly someone else has come across this issue. Is this just a >> limitation of local utilities? The utility is registered and work fine. I >> can restart the server and the data is still there. It is just on reinstall >> that I lose it. The probably is that it re-creates the tool. >> > > I think the problem is in Products.GenericSetup.components - in > _initUtilities it does > > elif factory is not None: > self.context.registerUtility(factory(), provided, name) > > without first checking of a utility with this name for this interface > already exists. > > I'd say that by default, it should not overwrite utilities like that, > though perhaps there should be a purge="true" option on the <utility /> > statement to get this behaviour if required. > > Perhaps a post to zope-cmf about this? > > > Martin > > -- > Author of `Professional Plone Development`, a book for developers who > want to work with Plone. See http://martinaspeli.net/plone-book > > > _______________________________________________ > Product-Developers mailing list > [email protected] > http://lists.plone.org/mailman/listinfo/product-developers >
_______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
