Plone技术论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 3185|回复: 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.


回复

使用道具 举报

发表于 2012-5-3 20:40:20 | 显示全部楼层
好东东,一定要支持
收藏备用谢谢分享
学习了!顶一个
回复 支持 反对

使用道具 举报

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

本版积分规则

小黑屋|手机版|Archiver|Plone技术论坛 ( 湘ICP备07003419

GMT+8, 2017-11-22 05:22 , Processed in 0.131935 second(s), 12 queries , Gzip On, Memcache On.

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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