`
wangchuanyin
  • 浏览: 31368 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

关于插件卸载后plugin文件下扔保留插件文件的解释

 
阅读更多
But why aren't uninstalled bundles/features immediately removed?
p2 does not immediately remove bundles on uninstall for several reasons:

Minimizing waste: By retaining the bundles, p2 can save time and bandwidth to should these bundles be re-installed.
For safety: Many bundles do not properly support hot-swapping and removal. Writing bundles that can be uninstalled completely is surprisingly difficult, and even harder to test.
In practice the timing of deletion should not matter as p2 ensures that the bundles will not be re-installed (modulo the org.eclipse.update.configurator issue described elsewhere in this FAQ).

p2 does periodically perform a garbage collection of uninstalled features and bundles, typically after having performed another uninstall. See elsewhere in this FAQ for details on how to explicitly request a garbage collect.

Why aren't bundles being removed when their associated feature has been removed?
There are two aspects to this problem.

First, you should ensure that features are recorded when installing a feature by specifying the "org.eclipse.update.install.features=true" property, such that the bundles have a recorded dependency against the feature. This property is not the default, so if you are using the p2 director manually it is worth verifying.

Second, you must invoke the p2 garbage collector.[1] By default, p2 only performs a garbage collect at its discretion. Normally this is fine since the actual bundles to be loaded are still known and managed (either in the config.ini file or by the simpleconfigurator).

You can cause a garbage collect in one of 3 ways:

Configure your product to invoke a GC on startup by adding the following line to your product's plugin_customization.ini (requires the org.eclipse.equinox.p2.ui.sdk.scheduler bundle):
org.eclipse.equinox.p2.ui.sdk.scheduler/gcOnStartup=true
Run the garbage collector application:[2]
eclipse -application org.eclipse.equinox.p2.garbagecollector.application -profile SDKProfile
Explicitly invoke the p2 garbage collection from code:
IProvisioningAgentProvider provider = // obtain the IProvisioningAgentProvider using OSGi services
IProvisioningAgent agent = provider.createAgent(null);  // null = location for running system
if(agent == null) throw new RuntimeException("Location was not provisioned by p2");
IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
if (profileRegistry == null) throw new RuntimeException("Unable to acquire the profile registry service.");
// can also use IProfileRegistry.SELF for the current profile
IProfile profile = profileRegistry.getProfile("SDKProfile");
GarbageCollector gc = (GarbageCollector) agent.getService(GarbageCollector.SERVICE_NAME);
gc.runGC(profile);

转自:https://wiki.eclipse.org/Equinox/p2/FAQ#cite_note-2
分享到:
评论

相关推荐

    IDEA lombok 插件

    IDEA lombok 插件 lombok-plugin-0.8.8-14

    QQmail插件

    QQmail插件

    管理员功能插件 for z-blog.rar

    安装:   将 FrontHelper 目录上传至 Z-Blog 系统 PLUGIN 目录中。...启用此插件后,请执行一次“文件重建”以使所有静态化页面生效。 卸载:   “插件管理”中停用“FrontHelper”插件。 执行“文件重建”。

    graylog-plugin-backup-configuration:用于转储和还原Graylog配置的插件

    默认情况下,plugin目录是相对于您的graylog-server目录的plugins/文件夹,可以在您的graylog.conf文件中进行配置。 重新启动graylog-server ,您就完成了。 在这种情况下,“正式”发行版是在插件版本的最新Gray...

    360黑科技DroidPlugin.zip

    DroidPlugin 是360手机助手在 Android 系统上实现了一种新的插件机制:它可以在无需安装、修改的情况下运行APK文件,此机制对改进大型APP的架构,实现多团队协作开发具有一定的好处。定义:HOST程序:插件的宿主。...

    eclipse-maven3-plugin离线maven插件

    本人卸载了Myeclipse8.5自带的恶心maven,在线安装n次失败,无奈之下找离线版本的,本人找了又找,看了又看,花了九牛二虎之力,终于终于找到一个离线版本的maven了,别嫌弃分数高,确实给力的,下载完记得好评噢!

    网游发号插件 for Discuz! v1.7X

    将下载好的程序包 解压yxhf_597youxi,上传到插件目录下 source/plugin/ 进入后台 插件->安装新插件->选择发号插件安装,选择安装编码,安装完成后记得进入界面-》导航设置修改排序 升级方法:将下载好的程序包 ...

    QT插件框架代码的demo

    qt插件系统代码。...它负责查找并加载插件,初始化它们,并且能够进行卸载。它还应该让主系统迭代加载的插件或注册的插件对象。 插件  插件本身应符合插件管理器协议,并提供符合主系统期望的对象。

    NSIS安装包制作工具

    LockedList plug-in--用来显示或取得选者被卸载或覆盖文件的锁定程序列表插件 NSISdl Smooth-- NSISdl plug-in的修改版本,增加了安装过程的平滑风格显示.与NSISdl的功能没有其他差别 NSISpcre plug-in-- Nsis 正则...

    xiuno模板知乎蓝魔改版源码 附多个插件

    xiuno知乎蓝模板的魔改版,模板比较简介,适合做各种论坛,而且非常简介!!文件里面有两个一个是xiuno程序一个是模板插件,程序是为了...搭建就完成了,首次搭建先在后台把所有的插件卸载,再重新安装,安装完再清缓存

    cordova-plugin-background-upload:用于背景上传的Cordova插件

    支持平台的iOS 安卓安装要安装插件: cordova plugin add cordova-plugin-background-upload --save要卸载此插件: cordova plugin rm cordova-plugin-background-upload样本用法该插件需要在上传之前进行初始化。...

    WordPress-Starter-Plugin:一个有据可查的入门插件,可用于快速WordPress插件开发

    WordPress入门插件 一个有据可查的入门插件,可用于快速WordPress插件... uninstall.php-插件卸载时触发。 去做 注意:(S&R)=搜索并按大小写替换。 插件名称:入门插件(S&R) 插件文件夹插件:入门插件(S&R)

    贴图库discuz插件(免费图片外链) v1.1.0.rar

    2、本插件为绿色插件,卸载后之前已经上传并外链的图片不受影响,并且永久有效; 3、因discuz插件开发限制,本插件只能在高级模式下上传,快速发帖和快速回复不可以(正在寻找解决办法); 4、因开发时间制约,暂时...

    UnityNativeTool:允许在Unity3d编辑器中卸载本机插件

    停止游戏后自动卸载本机插件,并在需要时加载它们 您甚至可以在玩游戏时手动卸载/重新加载它们 无需更改代码(使用通常的[DllImport] ) 回调UnityPluginLoad和UnityPluginUnload会触发 适用于Windows,Linux和Mac ...

    ROS的插件库pluginLIB机制讲解

    pluginlib是一个使用C++实现的库, 用于在ROS包里面动态的加载或卸载plugin. plugin满足一些条件的, 可以从运行库(例如共享对象, 动态链接库)中动态加载的类. Plugin在扩展或修改应用的行为上很有优势, 并不需要知道...

    cordova-plugin-ios-xhr:Cordova iOS 6+ File XHR插件

    科尔多瓦-插件-iOS-XHRcordova-ios 6+ File XHR插件关于最初,此插件是其他两个插件的合并,并与cordova-ios 6+兼容。 自从进行了修改以来, 的代码现在已被完全删除。 它保留在此处作为原始参考。 如果时间允许,...

    贴图库discuz插件(免费图片外链) v1.8.zip

    2、本插件为绿色插件,卸载后之前已经上传并外链的图片不受影响,并且永久有效; 3、因discuz插件开发限制,本插件只能在高级模式下上传,快速发帖和快速回复不可以(正在寻找解决办法); 4、因开发时间制约,...

    XShow插件for Discuz!7.0 v1.0.70.rar

    3, 后台导入插件处导入对应版本: discuz_plugin_xshow.txt  (导入插件文件夹中 gbk utf-8 big5) 4, 更新缓存. --------------------------------- 卸载方法 --------------------------------- 1, 打开...

    酷酷资源社同款xiuno模板知乎蓝魔改版源码附多个插件

    源码介绍 酷酷资源社用的是xiuno知乎蓝模板的魔改版,模板比较简介,适合做各种论坛,而且非常简介!!文件里面有两个一个是xiuno程序...搭建就完成了,首次搭建先在后台把所有的插件卸载,再重新安装,安装完再清缓存

    InstaSynchP-CSSLoader:加载和卸载 CSS url 的插件

    InstaSynchP-CSSLoader 用于加载和卸载 CSS url 的框架插件框架cssLoader插件可用于添加和加载样式。 可以有多个样式共享一个<style>以便它们可以相互替换。 为此,样式的 id 必须相同。 默认情况下,样式的...

Global site tag (gtag.js) - Google Analytics