Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349529 - [console] When an uninstall is not possible, it still looks like it succeeded.
Summary: [console] When an uninstall is not possible, it still looks like it succeeded.
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-16 04:32 EDT by Hristo Iliev CLA
Modified: 2019-09-24 16:30 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hristo Iliev CLA 2011-06-16 04:32:30 EDT
I'm trying to remove p2 feature from console:

osgi> provlgp
org.eclipse.cvs.feature.group 1.3.100.v20101029-7B77FO-8sF7B7AHCR5BQ75
org.eclipse.cvs.source.feature.group 1.3.100.v20101029-7B77FO-8sF7B7AHCR5BQ75
org.eclipse.egit.feature.group 0.8.4
org.eclipse.equinox.p2.user.ui.feature.group 2.1.0.v20101103-897OFx-FdHjO2NlKwKOHf8E
org.eclipse.equinox.p2.user.ui.source.feature.group 2.1.0.v20101103-897OFx-FdHjO2NlKwKOHf8E
org.eclipse.help.feature.group 1.3.0.v20101118-7i7tFE9FFt6ZopgSqKRnz0tH
org.eclipse.help.source.feature.group 1.3.0.v20101118-7i7tFE9FFt6ZopgSqKRnz0tH
org.eclipse.jdt.feature.group 3.7.0.v20100824-0800-7z8eFcgFMTfEQG1byPJlI_d9H155
org.eclipse.jdt.source.feature.group 3.7.0.v20100824-0800-7z8eFcgFMTfEQG1byPJlI_d9H155
org.eclipse.jgit.feature.group 0.8.4
org.eclipse.mat.feature.feature.group 1.0.100.201012150941
org.eclipse.pde.feature.group 3.7.0.v20100803-7b7oFXNFEx2XmfiPhi5933
org.eclipse.pde.source.feature.group 3.7.0.v20100803-7b7oFXNFEx2XmfiPhi5933
org.eclipse.platform.feature.group 3.7.0.v20100923-9fF7MHDqFsAkplGz0n61z-yU57WHoz0JdMfaI
org.eclipse.platform.source.feature.group 3.7.0.v20100923-9fF7MHDqFsAkplGz0n61z-yU57WHoz0JdMfaI
org.eclipse.rcp.feature.group 3.7.0.v20101115-9FB-FqhFr3P05j0S-HRVgSR
org.eclipse.rcp.source.feature.group 3.7.0.v20101115-9FB-FqhFr3P05j0S-HRVgSR
org.eclipse.sdk.feature.group 3.7.0.v20101118-7Q7xA7DPa2xdN86nbxlooGNr6aWgeOpuz-xq-WrZxV_3Q
org.eclipse.sdk.ide 3.7.0.I20101208-1300
org.eclipse.team.svn.feature.group 0.7.9.I20100512-1900

osgi> provremove org.eclipse.egit.feature.group 0.8.4
Remove complete for org.eclipse.egit.feature.group 0.8.4

After provremove reported successful completion I tried confapply, restart of dropins, restart of eclipse to apply the changes, but the feature is still on the system.

The profile still has the feature I'm trying to remove.

I also tried with other features like "org.eclipse.cvs.feature.group 1.3.100.v20110520-0800-7B78FHk8sF7BB7SAB4GVG5", but with the same result - the feature cannot be removed.
Comment 1 Pascal Rapicault CLA 2011-06-16 10:26:28 EDT
I tested this and it seems that the message being displayed on completion of the uninstallation is incorrect. For example if I try to uninstall the org.eclipse.equinox.p2.user.ui.feature.group it says it succeeds but it can't because it is included in the SDK.
However if I install something that I had installed on top of my SDK it gets uninstalled correctly.

Would you mind looking into this issue? The code is in org.eclipse.equinox.p2.console.
Comment 2 Shenol Yousouf CLA 2011-07-06 10:32:25 EDT
It is strange, however, that "provremove org.eclipse.sdk.ide" worked perfectly - errors started to pop up and after I stopped the IDE, eclipse.exe was gone.

On the other hand, "provremove org.eclipse.equinox.p2.user.ui.feature.group" doesn't seem to uninstall the feature - it is still listed with provlgp. In a debug session we saw that both the calculation and execution of the provisioning plan finished with status OK. Is this correct ? How are the planner and the engine are supposed to know not to touch features from the SDK ?

As a further note, I noticed that the creation of the provisioning plan is immediately followed by its execution. Since the creation produces a status result, shouldn't it be checked first before proceeding with the execution ?
Comment 3 Pascal Rapicault CLA 2011-07-06 15:35:03 EDT
> On the other hand, "provremove org.eclipse.equinox.p2.user.ui.feature.group"
> doesn't seem to uninstall the feature - it is still listed with provlgp. In a
> debug session we saw that both the calculation and execution of the
> provisioning plan finished with status OK. Is this correct ? How are the
> planner and the engine are supposed to know not to touch features from the SDK?
  The behaviour you are observing matches the semantics we gave to uninstall. Uninstall is attempting to remove what is being identified, but this may result in a no-op if the thing being uninstalled is still depended upon. For example if I install GMF (which depends on GEF and EMF), then install EMF (which is a no-op since EMF is already installed), then go and uninstall EMF, I don't want to remove GMF because of this. From a user point of view, the fact that GMF depends on EMF is an implementation detail.
  If needs be the planner could be changed to return an INFO status indicating that nothing will be done (though technically speaking there may be things that will be done like removing the root flag from the profile).

  Another semantics that could have been given to uninstall is one where we force the IU to be uninstalled and fail if it is depended upon. However I don't think this is a very suitable model for a user facing functionality.

> As a further note, I noticed that the creation of the provisioning plan is
> immediately followed by its execution. Since the creation produces a status
> result, shouldn't it be checked first before proceeding with the execution ?
  The status is checked in the first line of PlanExecutionHelper#executePlan
Comment 4 Pascal Rapicault CLA 2011-07-06 15:44:07 EDT
>   Another semantics that could have been given to uninstall is one where we
> force the IU to be uninstalled and fail if it is depended upon. However I don't
> think this is a very suitable model for a user facing functionality.
  Still this could be added (it is basically requesting a complete negation of the IU you are trying to uninstall)
Comment 5 Eclipse Genie CLA 2019-09-24 16:30:52 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.