Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Updates are not installed properly?
Updates are not installed properly? [message #841510] Wed, 11 April 2012 12:08 Go to next message
Christian Eugster is currently offline Christian Eugster
Messages: 134
Registered: July 2009
Location: St. Gallen Switzerland
Senior Member
Hi, I use p2 in the standard way in my rcp application (based on eclipse 3.7.2) to add update capabilities to my rcp application. I succeded to update some of my plugins via a remote update site. After the update my app does not work properly: I have problems with the ui, because a StackOverflowException is thrown (see uploaded file). Checking using the console shows, that the newly installed bundles are set to lazy with a lower bundle id, while the older one have the status installed and a higher id. I have been thinking, that p2 uninstalls older versions and installs newer versions. Have I anything to do, that older bundles are replaced by newer ones (I mean, that at startup time the newer bundles are used while older ones are ignored)?

Thank you!
  • Attachment: rcp.log
    (Size: 794.45KB, Downloaded 107 times)
Re: Updates are not installed properly? [message #841632 is a reply to message #841510] Wed, 11 April 2012 15:16 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal Rapicault
Messages: 290
Registered: July 2009
Location: Ottawa
Senior Member
Hi,

This is likely because the feature that included the orginal bundles has not been uninstalled. If you use the p2 UI that should just work, if you are using the p2 API you have to be sure to uninstall the previous feature and install the new one.

HTH,

Pascal
=-=-=
Consulting, training, bug fixing - pascal at rapicault dot net
Re: Updates are not installed properly? [message #842290 is a reply to message #841632] Thu, 12 April 2012 06:47 Go to previous messageGo to next message
Christian Eugster is currently offline Christian Eugster
Messages: 134
Registered: July 2009
Location: St. Gallen Switzerland
Senior Member
Hi Pascal,

I use p2 ui "out of the box". Inspecting the feature directory, I find just the new feature. When I delete the old plugins in the plugin folder, the app starts properly. Is it possible, that there exists a "registry" that is not updated cleanly?

Christian
Re: Updates are not installed properly? [message #844092 is a reply to message #841510] Fri, 13 April 2012 17:27 Go to previous messageGo to next message
F FA is currently offline F FA
Messages: 1
Registered: April 2012
Junior Member
Hi dear Christian Eugster.
I read your post in froum. I am new in eclipse plugin and product devdeloping and I am sorry because i can not help you Sad

I want add self updating to an eclipse product. I follow article in vogella site about this. in plugin.xml file i have this commands for update:

<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="menu:org.eclipse.ui.main.menu">
<menu label="Update">
<command commandId="org.eclipse.equinox.p2.ui.sdk.update"></command>
<command commandId="org.eclipse.equinox.p2.ui.sdk.install"></command>
</menu>
</menuContribution>
</extension point>

but when i click "check for update" in my product it says:"No updates were found" even i change product and version number of it featurs and plugins in initial export location.

I use eclipse indigo.
Can you help me? How did you do it?
Thank you.
Re: Updates are not installed properly? [message #844242 is a reply to message #844092] Fri, 13 April 2012 21:08 Go to previous message
Christian Eugster is currently offline Christian Eugster
Messages: 134
Registered: July 2009
Location: St. Gallen Switzerland
Senior Member
Hi F FA,

unfortunately I can not access the website of vogella (may be it is down?). As I see it, you don't have to add those commands. It seems, that you have set up p2 correctly as the menues are active and work correctly.

I do it in the following way:

Initially I set the version numbers in my plugins, features and product to (e.g. 1.0.0.201204121110 (major 1, minor 0, service 0, qualifier date and time (yyyymmddhhnn).

Each time I prepare an update for changed plugins, I update the qualifier to an actual timestamp (as described above) and do the same in the features that contain the plugins.

I add the the updated features to the site.xml and build the site.xml. Then I update the update site using rsync.

After that the next time I start my app, p2 messages that there is an update available (I do not automatic updates).

I hope that helps you.

Christian
Previous Topic:How to know if an InstallableUnit is already installed?
Next Topic:issue to generate some plugins in P2 format with a headless build.
Goto Forum:
  


Current Time: Wed Sep 17 21:52:00 GMT 2014

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

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