Hello to all,
Why it is not possible to update a previous version of available updates?
For example, I tested in eclipse oxygen.
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.201702100021
0.5.2.201606161145
If I check to update the 0.5.2.201606161145, 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==
com.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