Hi,
is there a way to remove a local utility from a site manager ?
I have a package that registers few local utilities via
componentregistry profile step. The need is to be able to uninstall
and remove the package.
I wrote a uninstall step that runs SiteManager::unregisterUtility
however after removing the package I am not able to get the
SiteManager with the following error:
009-07-21 12:07:51 WARNING OFS.Uninstalled Could not import class
'IGSAConnectionManager' from module 'collective.gsa.interfaces'
2009-07-21 12:07:51 WARNING OFS.Uninstalled Could not import class
'IGSAIndexQueueProcessor' from module 'collective.gsa.interfaces'
2009-07-21 12:07:51 WARNING OFS.Uninstalled Could not import class
'IGSAQueue' from module 'collective.gsa.interfaces'
2009-07-21 12:07:51 WARNING OFS.Uninstalled Could not import class
'GSAConnectionManager' from module 'collective.gsa.manager'
2009-07-21 12:07:51 ERROR ZODB.Connection Couldn't load state for 0x2dce
Traceback (most recent call last):
File "/Users/matucha/Projects/fryit/gsa/parts/zope2/lib/python/ZODB/
Connection.py", line 761, in setstate
self._setstate(obj)
File "/Users/matucha/Projects/fryit/gsa/parts/zope2/lib/python/ZODB/
Connection.py", line 819, in _setstate
self._reader.setGhostState(obj, p)
File "/Users/matucha/Projects/fryit/gsa/parts/zope2/lib/python/ZODB/
serialize.py", line 604, in setGhostState
state = self.getState(pickle)
File "/Users/matucha/Projects/fryit/gsa/parts/zope2/lib/python/ZODB/
serialize.py", line 597, in getState
return unpickler.load()
File "/Users/matucha/python/245/lib/python2.4/copy_reg.py", line
48, in _reconstructor
obj = object.__new__(cls)
TypeError: ('object.__new__(GSAConnectionManager) is not safe, use
Persistence.Persistent.__new__()', <function _reconstructor at
0x1c0c30>, (<class 'collective.gsa.manager.GSAConnectionManager'>,
<type 'object'>, None))
If I readd my package and run
SiteManager::getAllRegisteredUtilitiesFor I still see the utility
objects there and cannot remove them.
Matous