Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Helios and deploying updates
Helios and deploying updates [message #668845] Sun, 08 May 2011 18:25 Go to next message
Bernd Hofner is currently offline Bernd HofnerFriend
Messages: 68
Registered: July 2009
Member
Hello,

I upgraded an old RCP project to Helios.

Formerly I could update my plugins just by copying the new plugin version into the plugins-directory of my installation. That always worked great for me - but the mechanism has been replaced by something "better": p2 - well it might be good for more complicated settings, but from here it feels like overkill.

Following a trail of forum messages and articles, I tried to make my application fit for p2.
I wrapped my plugins into features, added categories, rewrote the product definitions and integrated the p2 UI. Just took me about a day.

To test it, I made a small change to an installed plugin, and exported the updated feature to an empty directory. From the application, I access this directory from the P2 GUI.
There I can select the feature to install, p2 finds out is an update and then I get this:

Your original request has been modified.
"SSI Profilstrasse CNC-Editor" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
Software being installed: SSI Profilstrasse CNC-Editor 1.0.1.201105081949 (ssi.profilstrasse.feature.cnceditor.feature.group 1.0.1.201105081949)
Software currently installed: SSI CNC-Editor 1.0.0 (ssi.profilstrasse.product.cnceditor 1.0.0)
Only one of the following can be installed at once:
SSI Profilstrasse CNC-Editor 1.0.1.201105081949 (ssi.profilstrasse.feature.cnceditor.feature.jar 1.0.1.201105081949)
SSI Profilstrasse CNC-Editor 1.0.1.201105081820 (ssi.profilstrasse.feature.cnceditor.feature.jar 1.0.1.201105081820)
Cannot satisfy dependency:
From: SSI Profilstrasse CNC-Editor 1.0.1.201105081820 (ssi.profilstrasse.feature.cnceditor.feature.group 1.0.1.201105081820)
To: ssi.profilstrasse.feature.cnceditor.feature.jar [1.0.1.201105081820]
Cannot satisfy dependency:
From: SSI Profilstrasse CNC-Editor 1.0.1.201105081949 (ssi.profilstrasse.feature.cnceditor.feature.group 1.0.1.201105081949)
To: ssi.profilstrasse.feature.cnceditor.feature.jar [1.0.1.201105081949]
Cannot satisfy dependency:
From: SSI CNC-Editor 1.0.0 (ssi.profilstrasse.product.cnceditor 1.0.0)
To: ssi.profilstrasse.feature.cnceditor.feature.group [1.0.1.201105081820]

The new version of the feature jar (...1949) and its two plugins are in the update directory.

The product definition looks like this:
<features>
<feature id="ssi.profilstrasse.feature.cnceditor"/>
<feature id="org.eclipse.equinox.p2.user.ui" version="2.0.1.r361_v20100903-897HFa-FX0z-z-ntoaavz0JPX628"/ >
<feature id="org.eclipse.rcp" version="3.6.2.r362_v20101104-9SAxFMKFkSAqi8axkv1ZjegmiBLY"/ >
<feature id="ssi.profilstrasse.feature.nl.de"/>
</features>

<configurations>
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="5" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
<plugin id="ssi.profilstrasse.cnceditor" autoStart="false" startLevel="6" />
</configurations>


As you can see, I also tried to get the "dropins" folder working - needless to say that it's quietly not working...
The referred (and updated) feature pulls the following plugins:

<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.apache.log4j" version="1.2.15" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.resources" version="3.5.2" match="greaterOrEqual"/>
<import plugin="org.eclipse.jface.text" version="3.5.2" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
<import plugin="org.eclipse.ui.views"/>
<import plugin="org.eclipse.ui.forms"/>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.gef"/>
<import plugin="ssi.profilstrasse.cnc" version="1.0.0"/>
</requires>

<plugin
id="ssi.profilstrasse.cnc"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="ssi.profilstrasse.cnceditor"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>



What's happening? Of course it can't install both features - it's supposed to update them.

Can't I switch back to the simpler update mechanism used before p2?
Accessing an update site is not really what I want - the application is installed on a PC without internet access. Formerly I could send my updates via EMail and the user just had to copy it in the right place.
Sending the hole feature as an update is also not what I really want - I'd like to get back to the good old and simple times Sad

Best regards,

Bernd
Re: Helios and deploying updates [message #669500 is a reply to message #668845] Tue, 10 May 2011 14:29 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

The old update system was just as complicated, and far more brittle. But just droping a plugin in <app_dir>/plugins didn't do an update, it depended on the OSGi resolver to simply pick a bundle version. The old update system could destroy your installation, fail silently, or provide an update in such a way that when the user restarted it includes some plugins from the old install + some plugins from the new install. Users don't like that.

You can still get most of the randomness back if you set up your RCP app to use <app_dir>/dropins for most of your features Smile

But I do understand your pain. p2 requires planned configurations, and is very, um, unforgiving outside of those boundaries.

p2 will allow updates to any root level IU (that meets the requirements of the rest of the system). In a default product build, there's only one root IU ... the product IU. You can't update a feature by itself in that case.

There are 2 things you could do:

1) similar to the Eclipse SDK, if you need to provide an update to your app, up version the micro number on your product, your feature, and 1..n plugins that provide the update.

2) make your feature separately updateable within your product. Andrew Niefer has some blog entries on making the product depend on a feature range and a root IU, search under http://aniefer.blogspot.com/

Good luck,
PW


Previous Topic:Bundle Name localization
Next Topic:Context Menu in Eclipse
Goto Forum:
  


Current Time: Tue Apr 16 21:38:33 GMT 2024

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

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

Back to the top