RCP p2 更新:一次只能安装以下之一



我创建了一个启用 p2 的 RCP 应用程序。将添加 UI,也可以添加更新站点。

但是添加新软件(已安装)会发生这种情况:

Your original request has been modified.
  "Help" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
  Software being installed: Help 1.0.0.201210110844 (smartapps.smartsignature.features.help.feature.group 1.0.0.201210110844)
  Software currently installed: SmartSignature 1.0.0.201210110831 (smartapps.smartsignature.application.product 1.0.0.201210110831)
  Only one of the following can be installed at once: 
    Help 1.0.0.201210110844 (smartapps.smartsignature.features.help.feature.jar 1.0.0.201210110844)
    Help 1.0.0.201210110831 (smartapps.smartsignature.features.help.feature.jar 1.0.0.201210110831)
  Cannot satisfy dependency:
    From: SmartSignature 1.0.0.201210110831 (smartapps.smartsignature.application.product 1.0.0.201210110831)
    To: smartapps.smartsignature.features.help.feature.group [1.0.0.201210110831]
  Cannot satisfy dependency:
    From: Help 1.0.0.201210110831 (smartapps.smartsignature.features.help.feature.group 1.0.0.201210110831)
    To: smartapps.smartsignature.features.help.feature.jar [1.0.0.201210110831]
  Cannot satisfy dependency:
    From: Help 1.0.0.201210110844 (smartapps.smartsignature.features.help.feature.group 1.0.0.201210110844)
    To: smartapps.smartsignature.features.help.feature.jar [1.0.0.201210110844]

好吧,这就是p2的重点...我认为有一件事可能会导致错误,但我不知道如何实际解决它。

存储库中的功能是否可能与基本 RCP 应用程序中安装的功能不同?安装 p2 时检测到它是相同的功能,但仍然认为它是不同的,因为它有不同的来源?这有什么意义吗?

问题可能是您的匹配器值是完美的/等效的/兼容的。然后,旧版本将不接受您的更新,因为依赖项不兼容。

查看您的功能并检查是否有类似以下内容:

<import plugin="smartapps.smartsignature.features.help.feature.group" version="1.0.0.201210110831" match="..."/>

匹配的可能值为:

 (perfect | equivalent | compatible | greaterOrEqual)

确保它是greaterOrEquals .这应该可以解决您的问题。

"一次

只能安装以下项之一"表示您尝试安装的项目不能在一个安装配置文件中共存。

这很可能是由"Bundle-SymbolicName"OSGi 清单头的"singleton:=true"指令引起的,该指令不允许在一个环境中多次安装使用(或声明)Eclipse 扩展点的捆绑包。

嗯,我想通了...这只是一个依赖问题。

我的应用程序产品基于这些功能及其版本。所以安装另一个版本失败了。

刚刚将我的应用程序功能添加为产品的依赖项,并在此应用程序功能中包含我的所有(可更新)功能。包含它们时,可以将功能设置为可选。

将此功能设置为可选仍包含在您的产品构建中,但它允许您一次仅执行 1 个功能的独立更新!

最新更新