Plone技术资料

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 3927|回复: 1

Removing custom property sheet with uninstall profile

[复制链接]
发表于 2012-2-21 14:42:53 | 显示全部楼层 |阅读模式
This is confusing for at least two reasons:
  • We have both "old style" and "new style" technologies actively in use. Old style refers to Extensions/Install.py (Python code) and new style refers to profiles/default (GS XML + setuphandlers.py Python code).
  • Successfully installing and uninstalling add-ons in all possible cases still requires the use of both old and new style technologies.

If you don't care about uninstall, you never need to use Extensions/Install.py. If you do care about uninstall, create an Extensions/Install.py with install and uninstall methods. Also create an "uninstall" profile (in addition to the "default" profile) e.g. profiles/uninstall. Configure the Extensions/Install.py:install() method to execute your "normal" profiles/default steps on installation. Now comes the "fun" part.
Because some technologies can be uninstalled "properly" via GS i.e. they respect the remove=True parameter, your Extensions/Install.py:uninstall() method should execute the "proper" GS profiles to do the uninstall. But if your add-on uses technologies that cannot be uninstalled "properly" via GS i.e. those that do not respect the remove=True parameter, then you will need to write Python code to perform the uninstall.
See:
for more information.


回复

使用道具 举报

wildin 该用户已被删除
发表于 2012-5-3 20:40:20 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|Plone技术资料 ( 湘ICP备14006519号-1 )

GMT+8, 2019-7-22 09:21 , Processed in 0.045668 second(s), 17 queries , Gzip On.

Powered by Plone! X3.4

© 2001-2019 Plone.org.

快速回复 返回顶部 返回列表