Uninstalling an (obsolete) Eclipse fragment during upgrade

北慕城南 提交于 2020-01-24 21:10:07

问题


I have a fragment which has been made obsolete, and I would like to create an update which uninstalls the fragment. I guessed that the right way would be to treat the fragment as a bundle, so I added the following to my p2.inf of the plugin containing installer actions:

instructions.install = \
    uninstallBundle(bundle:com.iar.cdt.arm.debugger.drivers.win32); \
    uninstallBundle(bundle:com.iar.ide.debugger.kernel.win32)

instructions.install.import \
    org.eclipse.equinox.p2.touchpoint.eclipse.uninstallBundle

But just as the installation is about to complete, I get the following error:

An error occurred while installing the items
session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]com.iar.installer.arm 0.12.0.v201110251455, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction).
No matching artifact found for: com.iar.cdt.arm.debugger.drivers.win32.
No matching artifact found for: com.iar.cdt.arm.debugger.drivers.win32.

Do I need to uninstall the entire hosting plugin?


回答1:


Try this

artifacts.0.classifier=osgi.bundle
artifacts.0.name=com.iar.cdt.arm.debugger.drivers.win32
artifacts.0.version=<the version of your fragment>

instructions.install = \
    uninstallBundle(bundle:${artifact})


来源:https://stackoverflow.com/questions/7893022/uninstalling-an-obsolete-eclipse-fragment-during-upgrade

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!