With the old style products you could create afterInstall and beforeUnistall scripts that were called on the product when proper.&nbsp; Is there a way to do this with the new style zope eggs.&nbsp; 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 &lt;<a href="mailto:ree@ree.hu">ree@ree.hu</a>&gt; 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>
&gt; Although, from what I&#39;ve found, this is not the problem. &nbsp;By stepping<br>
&gt; through the code, I found in this context, the local utility no longer<br>
&gt; exists. &nbsp;So at some point in the install reinstall process it is<br>
&gt; unregistered.<br>
&gt;<br>
&gt; Looking deeper, I found that in the reinstall of a product the method<br>
&gt; _cascadeRemove() is called from<br>
&gt; Products.CMFQuickInstallerTool.InstalledProduct that unregisters all<br>
&gt; utilities.<br>
&gt;<br>
<br>
</div><div class="Ih2E3d">&gt; I don&#39;t know how to go about fixing this problem since the<br>
&gt; infrastructure is not set up to handle this. &nbsp;Realistically, if there is<br>
&gt; an uninstall of a component needed, I would think it could be handled in<br>
&gt; the Products.GenericSetup.components class.<br>
&gt;<br>
&gt; Any ideas to help me get around this problem would be greatly<br>
&gt; 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&#39;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 &nbsp;- &nbsp;<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>