With the old style products you could create afterInstall and beforeUnistall scripts that were called on the product when proper. Is there a way to do this with the new style zope eggs. Maybe somewhere in zcml?<br><br>Thanks,<br>
Nathan<br><br><div class="gmail_quote">On Mon, Jun 16, 2008 at 12:31 PM, Balazs Ree <<a href="mailto:ree@ree.hu">ree@ree.hu</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Nathan,<br>
<div class="Ih2E3d"><br>
On Mon, 16 Jun 2008 10:51:34 -0500, Nathan Van Gheem wrote:<br>
<br>
> Although, from what I've found, this is not the problem. By stepping<br>
> through the code, I found in this context, the local utility no longer<br>
> exists. So at some point in the install reinstall process it is<br>
> unregistered.<br>
><br>
> Looking deeper, I found that in the reinstall of a product the method<br>
> _cascadeRemove() is called from<br>
> Products.CMFQuickInstallerTool.InstalledProduct that unregisters all<br>
> utilities.<br>
><br>
<br>
</div><div class="Ih2E3d">> I don't know how to go about fixing this problem since the<br>
> infrastructure is not set up to handle this. Realistically, if there is<br>
> an uninstall of a component needed, I would think it could be handled in<br>
> the Products.GenericSetup.components class.<br>
><br>
> Any ideas to help me get around this problem would be greatly<br>
> appreciated.<br>
<br>
</div>Not a solution, but the simplest workaround we found is setting up these<br>
utilities independently from genericsetup (and quickinstaller). This way<br>
you need to manually run an extra script to set up these utilities, and<br>
as a result quickinstaller will not have a chance to destroy and recreate<br>
the utility on reinstall. (Since it only borks stuff that it has set up<br>
itself.)<br>
<br>
Another gross hack that I've heard of (although I did not actually try it<br>
myself) is tinker with the __cmp__ method of the utility, which may<br>
convince quickinstaller to leave the utility intact. Maybe someone else<br>
will give more details about this.<br>
<br>
As far as for a real solution: I think the magic of quickinstaller is<br>
plain wrong. It should not ever delete your utilities on reinstall,<br>
because they form part of the content that is silently and entirely gone<br>
this way. (Think about object relations that are stored in local<br>
utilities, to understand the weight of this disaster.) I go even one step<br>
further: it also should not delete the utilities in case of an uninstall<br>
either, instead it should let you decide to delete them manually. There<br>
is something about upgrades (migrating data from an old version of<br>
utility to a new version) that makes this case a bit more complicated,<br>
however this is a more advanced use case and does not justify the data<br>
loss that happens on every reinstall, with the current implementation.<br>
<br>
Berst wishes,<br>
<font color="#888888"><br>
--<br>
Balazs Ree<br>
<br>
_______________________________________________<br>
Zope-CMF maillist - <a href="mailto:Zope-CMF@lists.zope.org">Zope-CMF@lists.zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/zope-cmf" target="_blank">http://mail.zope.org/mailman/listinfo/zope-cmf</a><br>
<br>
See <a href="http://collector.zope.org/CMF" target="_blank">http://collector.zope.org/CMF</a> for bug reports and feature requests<br>
</font></blockquote></div><br>