atom feed23 messages in net.sourceforge.lists.plone-developers[Plone-developers] QuickInstaller kil...
FromSent OnAttachments
Martin AspeliFeb 26, 2009 6:19 pm 
Hanno SchlichtingFeb 27, 2009 2:54 am 
Martin AspeliFeb 27, 2009 2:59 am 
Hanno SchlichtingFeb 27, 2009 3:25 am 
Martin AspeliFeb 27, 2009 3:47 am 
Matthew WilkesFeb 27, 2009 3:53 am 
Ricardo AlvesFeb 27, 2009 4:18 am 
Wichert AkkermanFeb 27, 2009 4:59 am 
Hanno SchlichtingFeb 27, 2009 5:09 am 
Martin AspeliFeb 27, 2009 5:29 am 
Daniel NouriFeb 27, 2009 5:35 am 
Chris RossiFeb 27, 2009 6:34 am 
Ricardo AlvesFeb 27, 2009 6:39 am 
Wichert AkkermanFeb 27, 2009 7:48 am 
Rob MillerFeb 27, 2009 11:25 am 
Maurits van ReesFeb 28, 2009 2:19 pm 
Hanno SchlichtingMar 14, 2009 8:22 am 
Lennart RegebroMar 14, 2009 8:42 am 
Hanno SchlichtingMar 14, 2009 9:06 am 
Gilles LenfantMar 14, 2009 11:33 am 
Martin AspeliMar 14, 2009 11:33 pm 
Wichert AkkermanMar 14, 2009 11:51 pm 
Alexander LimiMar 16, 2009 4:47 am 
Subject:[Plone-developers] QuickInstaller kills local utilities upon product re-install
From:Martin Aspeli (opti@gmail.com)
Date:Feb 26, 2009 6:19:39 pm
List:net.sourceforge.lists.plone-developers

Hi,

If you have a local utility installed using componentregistry.xml with the 'factory' option, it will be overwritten with a new one (and any data stored in it lost) when you re-install a product. This sucks.

I thought this was caused by GenericSetup's components.py handler, but in fact, this has a guard for this very thing.

Instead, it's caused by the automatic snapshotting performed by portal_quickinstaller.

I don't think that portal_quickinstall should run the uninstall for utilities during re-installation. A quick fix would be to change this line in Products.CMFQuickInstallerTool.QuickInstallerTool:

cascade=[c for c in InstalledProduct.default_cascade if c != 'portalobjects']

with this:

cascade=[c for c in InstalledProduct.default_cascade if c not in ('portalobjects', 'utilities',)]

This does mean that there's a chance there will be some stale utility registrations if you changed componentregistry.xml significantly between re-installs. However, an un-install ought to fix this. New registrations, and registrations where the 'component' argument of the <utility /> GS import instruction has changed will be dealt with by GS itself.

Any objections to making this change?

I notice http://dev.plone.org/plone/ticket/8410, and I see Hanno's point: storing data in the registration is probably not the best idea, nor is the re-install butting generally safe and the whole of portal_quickinstaller should die.

However, stomping on registrations and deleting data is bad, no matter what reasons that data was there in the first place. We don't currently have a better pattern that makes it easy to store persistent data according to a proper schema and making this installable through GS (though I know some people have started thinking about this and prototyping). The re-install button is there now, and people use it all the time.

Until portal_quickinstaller and the whole persistent configuration thing gets sorted out properly, I consider not erasing utility registrations on re-install to be the lesser of evils.

Martin

------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H