On 26/04/12 05:42, Maurits van Rees wrote:
Should we make QI support "uninstall" profile ?Yes. There is a ticket here, which might need to be turned into a PLIP: https://dev.plone.org/ticket/11328
HV> this came from a talk Cris and I had almost 18 months ago (yes, Cris, I know I never seconded you on that, sorry)...
I think the problem is a little bit more complex as Hanno pointed out in this thread: http://plone.293351.n2.nabble.com/Apparent-bug-in-Products-CMFQuickInstallerTool-td5814226.html
this is from Hanno's first answer: "Well, "uninstall profiles" are an invention of some people that has no real technical basis. There's never been support for them and I'm not aware of any PLIP or core documentation that advertises them. Specifying a second profile for your product actually is a bit dangerous, as quick installer picks the first profile it finds for a product and uses it as an install profile. There's no stable ordering of the profiles, so it could just as well pick the uninstall profile as an install profile. Technically there's only base, extension and upgrade profiles. There's no technical difference between an extension profile with a name "default" and one with a name "uninstall". I think these days both of these might show up as installable add-ons on the add-ons control panel." end of quotation...
If you do not create your own uninstall method, the QI takes care of undoing all recorded changes when you uninstall and undoing most recorded changes when you reinstall. Items like portal objects should normally be removed when uninstalling but should be kept while reinstalling.
HV> even if you create your own uninstall method, QI takes care of many things.
Indeed. The ultimate test is to afterwards remove the package from your buildout, rerun the buildout, restart Plone and see if anything breaks.
HV> no; the ultimate test is to write tests to probe that anything you added via the GS default profile was removed.
The standard QI uninstall code takes care of removing css, javascript and a bit more. I think if you create your own uninstall method you should probably let the uninstall profile handle everything.
HV> my latest tests with Plone 4.1.5 show that probably the only thing you need to put on your uninstall profile is a registry.xml file.
previously we needed also a browserlayer.xml but Maurits fixed that recently.
I have seen some uninstall profiles that are simply the same as the default profile. Apparently some people have the impression that giving the profile the name 'uninstall' magically makes the GenericSetup code do the opposite. This is a recent fix I did: https://github.com/plone/plone.multilingual/commit/b48c48bb5d84a30fa864364eaaf38c5029de86e3
HV> and it get worst: if you want to remove records from plone.app.registry you will have to use things like this:
https://github.com/collective/collective.googlenews/blob/master/collective/googlenews/profiles/uninstall/registry.xml so now we have "remove=true" and "delete=true"...resuming: how do you deal with uninstalling packages? it depends on what Plone version you're running; use Extensions/Install.py uninstall methods, write tests, and remove anything unneeded.
my $0.02 to the discussion...
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Product-Developers mailing list [email protected] https://lists.plone.org/mailman/listinfo/plone-product-developers
