Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Error when reverting p2 update from installation history(Error when reverting p2 update from installation history)
Error when reverting p2 update from installation history [message #1401169] Tue, 15 July 2014 08:17 Go to next message
Kovalan Venkatesan is currently offline Kovalan Venkatesan
Messages: 5
Registered: March 2014
Junior Member
I've been facing this problem quite for some time and thought you'll able to figure this out quickly.

I created a sample eclipse RCP application with the following components

1. com.module.product
2. com.eclispe.p2.feature
3. com.eclispe.p2.utils
4. com.modules.feature
5. com.module1


I set all component versions to be 1.0.0.

com.module.product has the .product file and p2.inf file. The product configuration is based on : features. The dependencies in .product file have com.modules.feature and org.eclipse.equinox.p2.rcp.feature.

com.eclispe.p2.feature includes the plugin.com.eclispe.p2.utils that contributes the "Update Handler" to perform the live update from the menu.

com.modules.feature is a dummy feature that depends on com.moudle.product and com.module1 (has dummy menu contribution).

Now when i change the versions of all mentioned components to 1.0.1 and export it to the repository and then try to perform p2 update the old exported 1.0.0 version, the updated plugins and features are downloaded and installed successfully. But it seems for the feature components alone (e.g., com.modules.feature) the old feature component ( com.modules.feature v1.0.0) gets deleted in the feature folder and has only the new feature component(com.modules.feature v1.0.1) .
The plugin folder has the old version as well as the new versions.

Due to this, when i perform "revert" to 1.0.0 version from Installation History, i get a error dialog saying "Revert configuration has encountered a problem" and "No repository found containing org.eclispe.update.feature, com.modles.feature 1.0.0".

I remember long time before I was successfully able to perform revert. But now somehow, not sure what mistake I am making in the configuration, it doesn't work as expected.
Re: Error when reverting p2 update from installation history [message #1401416 is a reply to message #1401169] Tue, 15 July 2014 15:28 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de Alwis
Messages: 189
Registered: January 2012
Senior Member

p2 will garbage collect artifacts when they are no longer referenced. When you revert, p2 essentially re-installs the previously-recorded artifacts; since they were GC'd from your installation, p2 has to find them from somewhere. Since it couldn't, it errored out.

The build tools (PDE/Build, Tycho, and probably Buckminster) create new repositories to host the results of the build. If you want to preserve older artifacts, you need to maintain a copy of the previous build results, and copy in the new build results using something like the p2.mirror task.

You could also try disabling the p2 GC using the gcOnStartup property.

Hope that helps.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: Error when reverting p2 update from installation history [message #1401887 is a reply to message #1401416] Wed, 16 July 2014 07:56 Go to previous message
Kovalan Venkatesan is currently offline Kovalan Venkatesan
Messages: 5
Registered: March 2014
Junior Member
Thanks for the quick reply Smile

I got your point and added the following to disable p2 GC

org.eclipse.update.install.features=true
org.eclipse.equinox.p2.garbagecollector/gc_enabled=false
org.eclipse.equinox.p2.ui.sdk.scheduler/gcOnStartup=false

But still the feature components get deleted. I am not sure how i can control this programmatically. Also I observe that the plugin components(com.module1 as stated above) which are added as dependents in the feature component(that gets deleted) doesn't get deleted. These plugins are referenced only in the feature components and still doesn't get garbage collected. The product plugin also doesn't get deleted. I am kind of confused why the garbage collection is applied only on the feature components. I am attaching my project for more details.
Previous Topic:RCP 3.7 popupmenu problem
Next Topic:[NEWBEE/E4] Hello world - Switch from plugin to feature - No application id has been found.
Goto Forum:
  


Current Time: Sun Sep 21 16:08:53 GMT 2014

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

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