Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » force update of existing feature when installing new feature
force update of existing feature when installing new feature [message #1669520] Thu, 12 March 2015 23:13 Go to next message
Nick Cooke is currently offline Nick CookeFriend
Messages: 1
Registered: February 2013
Junior Member
Feature_A contains plugin_A and is already in use by clients at version 1.0.0.

I have a new feature, feature_B, that depends on a later version (2.0.0) Plugin_A in feature_A.

Is it possible to configure these features such that if feature_B is installed it updates plugin_A? I have created a new version of feature_A (2.0.0) that depends on plugin_A.2.0.0 and I thought P2 would update this to resolve the conflicting dependency but it doesn't - when I try to install feature_B it fails with conflicting dependency saying feature_A.1.0.0 requires plugin_A.1.0.0 and feature_B.1.0.0 requires plugin_A.1.0.0

Any suggestions?


Re: force update of existing feature when installing new feature [message #1679576 is a reply to message #1669520] Mon, 16 March 2015 17:21 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 876
Registered: January 2012
Senior Member

There's a few issues here. It sounds like

  • plugin_A is a singleton (only one version can be installed at a time);
  • you've installed feature_A and feature_B as top-level requirements (aka root IUs);
  • you've created your features with plugin_A specified as a normal plugin.

Features specify an *exact* version of a bundle. When you update feature_A, p2 ensures that all existing constraints are still met, but since feature_B requires plugin_A 1.0.0, then the new version of feature_A has a conflicting requirement with feature_B, the update fails.

Solutions are:

  • Relax the version constraints on feature_B on plugin_A (see the 'depends' tab)
  • Update feature_B to 2.0 that includes plugin_A 2.0
  • Make plugin_A be non-singleton, such that multiple version can be installed simultaneously (but this can introduce problems with two bundles using different versions of plugin_A)

The p2 FAQ has more detail.

Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous exception during sign.p2.repository in headless build
Next Topic:p2 throws a mysterious unexpected error while resolving an update operation
Goto Forum:

Current Time: Thu Aug 13 15:53:37 GMT 2020

Powered by FUDForum. Page generated in 0.01851 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top