0

I have the following structure in my project:

Product "P" is based on Feature "FA" which is based on Plugin "PA" which depends on Libray-Plugin "PL". I can export the whole product and everything works fine.

Now I want to install different modules via my update site. For example: Modul "M" which is actually a feature called "FB" which is based on Plugin "PB" which depends on Library-Plugin "PL". I am able to install the module (feature) initially. At this point the Library-Plugin has a version of "1.0.0".

When I change the module (feature) and increment the version of FB, PB and PL to 1.0.1 and then try to install it, p2 shows me the following error:

Cannot complete the install because of a conflicting dependency.
 Software being installed: Modul Feature B - FB 1.0.1
 Software currently installed: Product P with Feature A - FA 1.0.0
 Only one of the following can be installed at once: 
  Library-Plugin - PL 1.0.0
  Library-Plugin - PL 1.0.1
Cannot satisfy dependency:
 From: Modul Feature B - FB 1.0.1
 To: Library-Plugin - PL 1.0.1
Cannot satisfy dependency:
 From: Product P with Feature A - FA 1.0.0
 To: Library-Plugin - PL 1.0.0

What am I doing wrong? What can I do to deploy upgrades of feature modules which depend on the same library plugins as other installed features or the product?

oberlies
  • 11,503
  • 4
  • 63
  • 110

1 Answers1

0

The problem is that you include the dependencies (i.e. library plugin PL) of your plug-ins in your features FA and FB. In this way, each feature restricts the version of PL to one exact version, and so if you try to update FA or FB independently, p2 would need to install multiple versions of PL. This is not possible for most bundles (because most bundles are singletons).

Instead, your features should only contain your own bundles PA, respectively PB. In this way, the installation of product P will still contain PL (because product installations created with p2 always contain all dependencies), but you will no longer get the "Only one of the following can be installed at once" error for the PL plugin. This is because PA and PB typically have a dependency to PL with a version range (or maybe even no version restriction at all), so PL can be updated by p2 whenever there is a new version available on your update site.

oberlies
  • 11,503
  • 4
  • 63
  • 110