Hello to all,

Why it is not possible to update a previous version of available updates?

For example, I tested in eclipse oxygen.
I have installed the oldest version of workspace mechanic from
http://alfsch.github.io/eclipse-updates/workspacemechanic
In Preferences -> Install/Update -> Select "*Show all versions of available
software*"
In Help-> Check for updates it shows 2 available versions for this plugin
0.5.2.*2017*02100021
0.5.2.*2016*06161145

If I check to update the 0.5.2.*2016*06161145, it ignores my decision and
installs the latest one.

It is confusing.
it is done intentionally or it is a bug?

Then, I have my own plugin from where I would like to make it possible.
I did:

OperationFactory *op* = new OperationFactory();
UpdateOperation operationUpdate =  *op*.*createUpdateOperation*(
toUpdateVersionsID, uriToUse, monitor);
IStatus status = operationUpdate.resolveModal(monitor);

*//and then I am trying to change the original request which has:*




*//==Additions==//        com.myplugin.feature.feature.group
1.0.0.201908072020//==Removals==//
 com.mypluin.feature.feature.group 1.0.0.201906261231*

IProfileChangeRequest request = operationUpdate.getProfileChangeRequest();

request.removeAll( request.getAdditions());
request.add( item.getIUReplacement() );  //adding
IInstallableUnit.getIUReplacement() a previous versions of available
updates for the plugin

And in the logs it shows that removeAll() did not worked, it still has what
was originally requested.

=
*=Additions==       com.**mypluin*
*.feature.feature.group    1.0.0.201908072020  that is the latest available
version that it still installs       **com.**mypluin*
*.feature.feature.group *

* 1.0.0.201908071953  that is the only versions that I would like to
install==Removals==      * c*om.**mypluin**.feature.feature.group *
* 1.0.0.201906261231       **com.**mypluin**.feature.feature.group *
* 1.0.0.201908072020  I am trying to remove this , but it still installs
it.       **com.**mypluin**.feature.feature.group *
* 1.0.0.201906261231 *



Basically, is it possible using eclipse equinox p2  api to install from
code, the previous available versions ?
I thought that I am close to solve it, but I don't know what else I can do
to change original request.

Any advice is welcome. Thank you

Kind Regards
Lidia
_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to