Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 228517

Summary: Unable to use p2 UI to uninstall features installed by old UM UI
Product: [Eclipse Project] Equinox Reporter: DJ Houghton <dj.houghton>
Component: p2Assignee: DJ Houghton <dj.houghton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ashishp, john.arthorne, mknauer, pascal, simon_kaegi, thomas, timothym
Version: 3.3Flags: john.arthorne: review+
Target Milestone: 3.4 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description DJ Houghton CLA 2008-04-23 16:36:59 EDT
N20080422-2000

- start Eclipse
- add new site: Ganymede Discovery Update site (http://download.eclipse.org/releases/ganymede/)
- install CDT
- restart
- note that CDT is there
- uninstall CDT
- restart
- note that CDT is still there

I wonder if this is related to the code which is installing things that are listed in the platform.xml file.
Comment 1 DJ Houghton CLA 2008-04-23 17:15:57 EDT
I've verified that this was also a problem in n0421 which is before we released the latest platform.xml reconciliation code.
Comment 2 DJ Houghton CLA 2008-04-23 17:57:36 EDT
I've exported all the p2 bundles and put them on top of last night's nightly build and I'm unable to reproduce this problem. I'll re-open if I see it again but for now I will close.
Comment 3 Thomas Hallgren CLA 2008-04-24 09:46:17 EDT
I'm using the I20080422-0800 build and I experience a similar problem.

I installed the WTP JPA feature. Later I tried to revert my configuration to the one I had before that installation. To my surprise, after restarting the IDE the JPA feature was still active. I then tried to uninstall it. The uninstall appears to be a success but after restarting the IDE, the feature reappears and its it's still active.
Comment 4 DJ Houghton CLA 2008-04-25 14:19:59 EDT
This is happening for me again today.
Comment 5 DJ Houghton CLA 2008-04-25 14:21:21 EDT
Thomas, I would recommend opening a new bug report for your problem. This bug is focused on the install then un-install scenerio and is unrelated to the revert action. Thanks.
Comment 6 DJ Houghton CLA 2008-04-25 17:15:49 EDT
It turns out this happens when you install a feature via the old update manager UI. Because of the way we install, it is treated similar to the dropins repository (which we aren't allowed to un-install from) 

When we install things, they aren't added to the bundle pool so if we try to uninstall from p2, we can't uninstall them.

If we try to uninstall via the old update manager UI I *think* it uses .del files to indicate that something should be removed on next startup but that code is run by the update configurator which we don't use, so we end up re-installing everything on the next startup.

One thing that Simon mentioned that I will investigate is the use of .del files by the DirectoryWatcher. When Jeff originally wrote it, he used those files to indicate a way to filter out and ignore things. I also need to review the way that update configurator handled the deletion.

Comment 7 Thomas Hallgren CLA 2008-04-25 18:03:44 EDT
(In reply to comment #5)
> Thomas, I would recommend opening a new bug report for your problem. This bug
> is focused on the install then un-install scenerio and is unrelated to the
> revert action. Thanks.
> 
I tried both uninstall and revert. None of them worked so I still think it might be the same problem.

I didn't install with the old update manager. Everything I had was installed from the new UI.

Comment 8 Tim Mok CLA 2008-04-28 10:56:48 EDT
I'm experiencing the same problem using a local repo that I've generated. I can install something but the uninstall doesn't actually work.
Comment 9 DJ Houghton CLA 2008-04-28 11:14:57 EDT
Thomas/Tim, if you are using the regular p2 UI and not the old update manager UI then please enter a new bug so this issue can be tracked. Thanks.
Comment 10 Tim Mok CLA 2008-04-29 13:02:45 EDT
I don't know what was changed but the I20080429-0100 build is working fine with installing and uninstalling CDT from the Ganymede Discovery Update site.
Comment 11 DJ Houghton CLA 2008-04-29 13:11:17 EDT
Which UI?
Comment 12 Tim Mok CLA 2008-04-29 14:39:29 EDT
(In reply to comment #11)
> Which UI?
> 

Ah ok, I was using the p2 UI.
Comment 13 DJ Houghton CLA 2008-05-06 11:24:33 EDT
I have created bug 230412 to cover the case where we are trying to install and uninstall via the old Update Manager UI.

I will use this bug to cover the case where we are installing via the old Update Manager UI and trying to uninstall via the p2 UI.
Comment 14 DJ Houghton CLA 2008-05-08 11:44:47 EDT
Created attachment 99312 [details]
patch

We talked this over and since the discovery mechanism for changes in the platform.xml file is the same as the dropins folder, we are unable to uninstall these features. 

The best story for 1.0 is to add the "not-uninstallable" property to the IU which would disable the Uninstall button in the UI.

The general story is that however you installed the features into your system (old UM UI, dropins, p2 UI), you must use the same mechanism to uninstall them.
Comment 15 DJ Houghton CLA 2008-05-08 11:55:08 EDT
Released.
Comment 16 Susan McCourt CLA 2008-05-20 15:24:36 EDT
*** Bug 229605 has been marked as a duplicate of this bug. ***
Comment 17 Ashish Patel CLA 2008-05-21 14:56:52 EDT
I'm reopening this one for several reasons:

Background: we have a product that installs via Update manager using the install-handler (install/uninstall hooks).

1) After installing our product, which causes p2 to launch the old UM, when the workbench restarts and if I go to the help -> software updates menu the entire workbench halts and I have to kill the process from the process list. (This is using RC1)

2)  How can a user use the old UM to uninstall their product?  In the past I used to go to Manage Software configuration, then right click on the main feature of my product and select uninstall.
Comment 18 DJ Houghton CLA 2008-05-21 16:16:01 EDT
Your first problem sounds like bug 232504. I personally experienced delays of several minutes when opening the dialog.

I believe you should be able to uninstall via the p2 UI. If not, then you can enable the old Update Manager UI via Windows -> Preferences -> General -> Capabilities -> Classic Update Manager. This will enable the menu options for your Manage Configuration dialog.
Comment 19 Ashish Patel CLA 2008-05-21 23:09:48 EDT
I see the capabilities listed in the Eclipse SDK but not in any of the Eclipse M7 Ganymede packages (http://www.eclipse.org/downloads/packages/).  Why is that?
Comment 20 DJ Houghton CLA 2008-05-22 10:41:27 EDT
I don't know how the EPP packages are built. John, do you know? Perhaps they are being built on a version of the SDK which is older? Or maybe they don't contain all the same bundles?
Comment 21 John Arthorne CLA 2008-05-22 10:53:52 EDT
I don't know.
Comment 22 Pascal Rapicault CLA 2008-05-22 13:09:13 EDT
The EPP packages are built by the pde build packager which ends up being equivalent to a dropins behavior.
Comment 23 Markus Knauer CLA 2008-05-22 14:05:37 EDT
Hmm, does anybody know the bundle/plug-in that adds the capability functionality? Maybe this plug-in is not available in every EPP package... e.g. it is not available in the CPP package, but it *is* available in the RCP package.
Comment 24 DJ Houghton CLA 2008-05-22 14:09:22 EDT
I just downloaded the "Eclipse for RCP/Plug-in Developers" from http://www.eclipse.org/downloads/packages/ and it does contain the Classic Update capability.

I believe it is contributed by the org.eclipse.equinox.p2.ui.sdk bundle.