[Product-Developers] How to remove local utility

cewing cewing at u.washington.edu
Fri Aug 7 16:22:37 UTC 2009



mhora wrote:
> 
> Thank you for the link, I have come across that too. This solution works
> but it's not very reliable. My current problem is that I'm not using
> Extension/uninstall/install method but only profiles.
> 
> If I reinstall the product, GS unregisters the utility, creates new one
> and registers it. Hence I have 8 utility objects and none registered and
> I'm not able to remove them, because I cannot get them via getUtility.
> 
> Either I'm doing something terribly wrong or everybody uses profiles has
> to have the same problem :) 
> 

You may not be using an Install.py, but you can do a similar thing with a GS
profile using setuphandlers and the import_steps.xml GS step.  You can also
(and probably should) create an uninstall profile, to be run when your
product is uninstalled.  Then you can use setuphandlers in the uninstall
routine to remove old utilities in the manner outlined in that blog post.  

Some basic information about using import_steps.xml and setuphandlers.py can
be found here:

http://plone.org/documentation/tutorial/borg/setup-using-genericsetup

More reading on GS uninstall profiles is linked from this page:

https://weblion.psu.edu/trac/weblion/wiki/UninstallProfile

Good luck!

C
-- 
View this message in context: http://n2.nabble.com/How-to-remove-local-utility-tp3341437p3405349.html
Sent from the Product Developers mailing list archive at Nabble.com.




More information about the Product-Developers mailing list