Op 26-04-12 14:11, Héctor Velarde schreef:
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...
As far as I am aware, currently the profile names are sorted in
alphabetical order. The order might be different on different operating
system though. For example, 'Final' with upper case F may be sorted
before or after 'default' with lower case d. As long as your profile
names start with a lower case character, the ordering should be the same
everywhere. The QI picks the first one, so with 'default' and
'uninstall' this will always be 'default'.
I think the only profile names I have ever used, are default, initial,
test/testing and uninstall. That has worked fine as far as I remember.
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 am not aware that I did anything here, but I tend to forget stuff like
this. :-)
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"...
Indeed, it totally depends on how the underlying import step is written.
Some code may simply ignore any 'remove' or 'delete' options and add
the item anyway. And some code may see 'remove=False' and think: ah,
'remove' has been specified, so let's remove this item.
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.
Indeed.
--
Maurits van Rees: http://maurits.vanrees.org/
Zest Software: http://zestsoftware.nl
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers