[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-12-06 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ross Patterson wrote: I got tired of reindexing large indexes that were cleared unintelligently by the index import adapters so I wrote the following exportimport.pluginindexes and overrides.zcml. I'm posting them here in case anyone wants to use

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-12-05 Thread Ross Patterson
I got tired of reindexing large indexes that were cleared unintelligently by the index import adapters so I wrote the following exportimport.pluginindexes and overrides.zcml. I'm posting them here in case anyone wants to use the code. This doesn't handle reindexing indexes when it's needed but

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-08-22 Thread yuppie
Hi Stefan! Stefan H. Holek wrote: On 17. Aug 2006, at 15:50, yuppie wrote: My approach would be to improve the catalog adapters. Even if you stick to the behavior implemented in setuphandlers.py it would have been easier and more straight forward to implement it in a subclass of

Re: [Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-08-21 Thread Stefan H. Holek
On 17. Aug 2006, at 15:50, yuppie wrote: My approach would be to improve the catalog adapters. Even if you stick to the behavior implemented in setuphandlers.py it would have been easier and more straight forward to implement it in a subclass of ZCatalogXMLAdapter, overriding the default

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-08-17 Thread yuppie
Hi Stefan! Stefan H. Holek wrote: On 16. Aug 2006, at 18:18, yuppie wrote: AFAICS the catalog.xml in the profile is a normal catalog setup file. The default import step for this file should be registered and updates the catalog if all steps are run. Yes, the default machinery creates

Re: [Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-08-16 Thread Stefan H. Holek
Talking about abuse... For the UnicodeLexicon product I have created a setuphandler that updates ZCTextIndexes in the catalog. This means it basically contains the code that would formerly have lived in Extensions.Install.install. Would this be considered abuse of GenericSetup?

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-08-16 Thread yuppie
Hi Stefan! Stefan H. Holek wrote: For the UnicodeLexicon product I have created a setuphandler that updates ZCTextIndexes in the catalog. This means it basically contains the code that would formerly have lived in Extensions.Install.install. Would this be considered abuse of GenericSetup?

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-08-16 Thread Stefan H. Holek
On 16. Aug 2006, at 18:18, yuppie wrote: AFAICS the catalog.xml in the profile is a normal catalog setup file. The default import step for this file should be registered and updates the catalog if all steps are run. Yes, the default machinery creates the UnicodeLexicons from

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-08-07 Thread yuppie
Hi Martin! Martin Aspeli wrote: I've used this here now: http://svn.plone.org/svn/collective/borg/trunk/examples/charity/ I'm basically using it to modify a FTI that I know exist (the use case is to modify, explicitly, not add). It may be nice if something like this was generalised a

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-08-07 Thread yuppie
Hi Martin! Martin Aspeli wrote: yuppie-2 wrote: Martin Aspeli wrote: I've used this here now: http://svn.plone.org/svn/collective/borg/trunk/examples/charity/ I'm basically using it to modify a FTI that I know exist (the use case is to modify, explicitly, not add). It may be nice if

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-08-06 Thread Martin Aspeli
Hi guys, yuppie wrote: Ok. Wrote a prototype for you. And it worked great! :) I've used this here now: http://svn.plone.org/svn/collective/borg/trunk/examples/charity/ See especially http://svn.plone.org/svn/collective/borg/trunk/examples/charity/Extensions/Install.py and

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-07-31 Thread yuppie
Hi Martin! Martin Aspeli wrote: If anyone has a more complete and concise code example for this use case, please let me know. Ok. Wrote a prototype for you. HTH, Yuppie import logging import os from zope.component import queryMultiAdapter from zope.interface import implements from

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-07-30 Thread Martin Aspeli
Rob Miller wrote: maybe i'm missing something, but is there a reason why you wouldn't want to simply make your profile active and then import specific steps programmatically from within your install method, rather than invoking the import adapters manually? Because in this case I wouldn't

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-07-28 Thread yuppie
Hi Martin! Martin Aspeli wrote: I realise this isn't entirely kosher (and that yuppie has much better long-term ideas), but I am wondering if it's possible to invoke some GenericSetup handler code during a more traditional Extensions/Install.py install. This is purely for convenience - but if

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-07-28 Thread yuppie
Tres Seaver wrote: I would actually like to surface the functionality which makes partial imports easy. My CMFFolderExport product demos this for content space folders: http://palladion.com/home/tseaver/software/CMFFolderExport The product uses the registered GS handlers to drive views for

[Zope-CMF] Re: Abusing GenericSetup during traditional installs

2006-07-28 Thread Rob Miller
Martin Aspeli wrote: Hi, I realise this isn't entirely kosher (and that yuppie has much better long-term ideas), but I am wondering if it's possible to invoke some GenericSetup handler code during a more traditional Extensions/Install.py install. This is purely for convenience - but if I need