Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Downgrade feature with multiple installed versions(Have feature v1.0 and v2.0, but want to remove v2.0)
Downgrade feature with multiple installed versions [message #1172411] Tue, 05 November 2013 22:43 Go to next message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 138
Registered: March 2010
Senior Member
Hi all,

Suppose an RCP application has 2 versions of the same feature (suppose 2.0.0 was installed and is the one currently in effect, with v1.0.0 still present but only included in a previous profile):

- 1.0.0
- 2.0.0

On startup, the application somehow decides a downgrade is needed (specifically an HTTP GET from a well-known URL returns a special value) and that 2.0.0 must this be removed . So far so good.

PROBLEM: I try to "auto-cleanup" such cases as follows:

    boolean downgrade = checkWebServerVersion();
    if (! downgrade) return; // we are ok

    Set<IInstallableUnit> toUninstall = getDowngradeFeatures();
    // assume toUninstall has " 2.0.0"

    if (toUninstall.size() > 0) {
        UninstallOperation op = new UninstallOperation(session, toUninstall);
        IStatus result = op.resolveModal(monitor);
        if (result.isOK()) {

I ran the above and surprisingly 1.0.0 was removed instead! Any ideas why this could happen?
Re: Downgrade feature with multiple installed versions [message #1180048 is a reply to message #1172411] Sun, 10 November 2013 18:53 Go to previous message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
I'm suprised by your description since this code is used by the p2 UI when performing the uninstallation. I quickly looked at the UninstallOperation code and the IU being uninstalled is the IU being passed as a parameter.

If you can provide a simple setup to reproduce this, then we can further investigate.
Otherwise, make sure that the ID's and versions being passed in are the right ones and that the profiles do include the version of the IUs you intend.


Previous Topic:non-deterministic p2 configuration generation on first start
Next Topic:Service Factory with Declared Service
Goto Forum:

Current Time: Wed Dec 08 13:48:43 GMT 2021

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

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

Back to the top