Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Using p2 to maintain an "exact" installation [SOLVED](Constraining installed bundles to specific set of plugins using a feature)
Using p2 to maintain an "exact" installation [SOLVED] [message #1403614] Thu, 24 July 2014 15:15 Go to next message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 138
Registered: March 2010
Senior Member
UPDATE: I finally figured out that in fact everything below was working properly. The "rollback" operation worked and the profile was updated to only include previous versions of the plugin, but the upon restarting after the update the "" was modified to include the "newer versions" of the plugins still present (not garbage-collected) in the "plugins" folder. I then found that another developer had added a dependency to "org.eclipse.update.core" which brought in the old configurator (org.eclipse.update.configurator, the one that scans plugins folder and installs everything) causing this behavior.


My RCP application invokes the P2 API directly on start-up to check our update site. It updates to newer versions automatically and restarts (or proceeds with no action if nothing newer is found).

I want to have the ability to "downgrade" client installations (e.g. for rollback reasons) using this approach. To this end I use the SynchronizeOperation which the documentation says: Quote:
will modify the installation to exclusively include the InstallableUnit mentioned

I understood this to mean that it will add/remove stuff as needed to "match" the target IU. Therefore I have a single installable unit (a feature) which contains a collection of plug-ins, so my update sites (published with Apache HTTP) look like this:


Please note that the p2 update site is at a single URL:". In fact "current" is a symlink on the web server pointing to an update site directory that initially contains my.feature. and its plug-ins. When I deploy my.feature. to the web server, I change the symlink to point to the new directory and clients download the new versions on startup (works as intended).

Unfortunately "downgrading" doesn't seem to work: if I change the symlink back to my.feature., the client detects the change and executes a provisioning operation (SynchronizeOperation) and then restarts, but:

  1. the "plugins" folder contains both old and new plugins (e.g. both my.plugin. and my.plugin.
  2. the configuration\org.eclipse.equinox.simpleconfigurator\ contains both the old and the new version of the plugins
  3. at runtime the new version of the plugin is loaded

Am I wrong in my understanding of the synchronize operation? Why does it not remove the newer plug-ins?

[Updated on: Sat, 26 July 2014 14:03]

Report message to a moderator

Re: Using p2 to maintain an "exact" installation [message #1403672 is a reply to message #1403614] Fri, 25 July 2014 08:38 Go to previous message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 138
Registered: March 2010
Senior Member
I've been trying to figure this out and located this in the Equinox FAQ which says:

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

I have added this option to my configuration/config.ini file which is as follows:


I'm still getting the same behavior though. I am not sure whether the option has taken effect.

What evidence would I look for to verify that features are being recorded and that plug-ins have dependencies upon them? Is this recorded in the configurator's file and what does it look like?

Also, is there a way to enable this option using the provisioning API (some method in the agent/session/job)?

[Updated on: Fri, 25 July 2014 08:42]

Report message to a moderator

Previous Topic:JNDI lookup from OSGI equinox bundle deployed on tomcat (bridged mode)
Next Topic:Composite repository entry that does not bring in categories
Goto Forum:

Current Time: Sun Oct 24 17:54:40 GMT 2021

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

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

Back to the top