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

Bug 241637

Summary: p2 can't uninstall old-UM style plugins
Product: [Eclipse Project] Equinox Reporter: James Blackburn <jamesblackburn+eclipse>
Component: p2Assignee: DJ Houghton <dj.houghton>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daition, jamesblackburn+eclipse, pascal, susan
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:

Description James Blackburn CLA 2008-07-22 06:21:39 EDT
Build ID: 3.4

Steps To Reproduce:
1. I added a new local update site, pointed at a local old-style clearcase .eclipseextension directory.
2. I pressed Install
3. The new update manager said that the update site wasn't compatible with p2, so I let it install using the old update manager.

Bug 1:
4. Having let me Install the software the "Uninstall" button is greyed out in the p2 "Installed Software" tab.

Bug 2:
I enabled the old Update Manager UI, and uninstalled the feature from the Manage Configuration dialog.  While the plugins seem to be uninstalled as far as the old UM is concerned (and they've been removed from the plugins directory), the P2 UI still shows the plugins as installed...
Comment 1 Susan McCourt CLA 2008-07-22 11:11:19 EDT
In step 1, were you running a self-hosted Eclipse, or a fresh 3.4 SDK?  
In step 3, you were prompted to use the update manager because the item you were installing must have had an install handler, and p2 does not support install handlers.  
In step 4, there are several reasons the button could be grayed.  Was there still some provisioning operation running (for example, did the progress view show that something was going on?)  That is one possibility.  Another is that you are running in a shared install mode.  I opened bug #241683 to cover the UI improvement for providing a better explanation to the end user.

I assume DJ is looking at the last issue.
Comment 2 James Blackburn CLA 2008-07-22 11:37:16 EDT
(In reply to comment #1)
> In step 1, were you running a self-hosted Eclipse, or a fresh 3.4 SDK?  
> In step 3, you were prompted to use the update manager because the item you
> were installing must have had an install handler, and p2 does not support
> install handlers.  
> In step 4, there are several reasons the button could be grayed.  Was there
> still some provisioning operation running (for example, did the progress view
> show that something was going on?)  That is one possibility.  Another is that
> you are running in a shared install mode.  I opened bug #241683 to cover the UI
> improvement for providing a better explanation to the end user.
> 
> I assume DJ is looking at the last issue.
> 

This was from a brand-new untar'd Eclipse classic.

More detailed steps to reproduce:
1) untar fresh Eclipse 3.4 (classic)
2) Execute and point at fresh workspace
3) Install GEF using p2
4) Restart
5) Add the following update site: http://www3.software.ibm.com/ibmdl/pub/software/rationalsdp/clearcase/ccrc/701/update/
6) Try to install Rational ClearCase 7.0.1D080604 (both items selected under "Rational ClearCase Remote Client")
7) "Unsupport Install" dialog => Launch... old update manager
8) Add the Rational update site again to the old update manager
9) Accept the terms and Install All
10) Restart

11) Now if you enter the p2 UI, Rational ClearCase will appear to be Installed, and the "Uninstall..." button is greyed out.
12) If you enter the old update manager UI you can uinstall rational clearcase (and restart when prompted)
13) Plugins don't appear to be uninstalled (they're still in the plugins folder, and the rational clearcase icons are in the Eclipse UI), but the old update manager software update menu has disappeared from the Help menu.
14) Reenable the Old update manager capability
15) Try to uninstall again (this time the plugins are deleted!)
16) New p2 Software Update UI shows the Rational ClearCase plugins as installed -- it is out of sync with the old update manager -- the plugins really no longer exist in the workspace...

I just did all of the above from a clean eclipse & clean workspace.  Fingers crosses you _should_ be able to reproduce.

Comment 3 James Blackburn CLA 2008-07-22 14:02:58 EDT
Hi Susan,

So to answer you question directly:

(In reply to comment #1)
> In step 1, were you running a self-hosted Eclipse, or a fresh 3.4 SDK?  

Fresh 3.4 SDK.

> In step 4, there are several reasons the button could be grayed.  Was there
> still some provisioning operation running (for example, did the progress view
> show that something was going on?)  That is one possibility.  Another is that
> you are running in a shared install mode.  I opened bug #241683 to cover the UI
> improvement for providing a better explanation to the end user.

In this case I don't believe either were the case.  I was just using the default classic 3.4 on a fresh workspace, restarting when prompted during the installs. All the installation steps appeared to go through without issue.

Comment 4 Susan McCourt CLA 2008-07-22 17:48:57 EDT
Ok, based on your steps, and what DJ says in bug #241683 comment #3, I believe that the button is grayed because the p2 code "locked" the bundle from p2 uninstall since the bundle was installed and managed by UM, and then discovered by p2.  Not obvious to the end user (hence bug #241683), but otherwise working as designed.  (DJ, can you confirm?).

Steps 12 - 16 seem to indicate a problem, in particular that the bundles were not uninstalled the first time, and that the p2 UI showed that the bundles were there even after they were gone.  It sounds as if the p2 info (in bundles.info or the profile) is not in synch with what's on disk.  This is unfortunately out of my area of expertise, so I'll let DJ comment.
Comment 5 DJ Houghton CLA 2008-07-23 14:21:22 EDT
Yes, the "uninstall" button is intentionally greyed out for things which have been installed via the drop-ins folder or old Update Manager UI.

I followed your steps and was able to uninstall the CC features the first time with the UM UI. I did this on Windows XP (Sun 1.5.0_08) and will try RedHat Linux (IBM 1.5.0_sr5a) next in case there is a platform issue.
Comment 6 DJ Houghton CLA 2008-07-23 14:43:36 EDT
Sorry James but I am unable to reproduce your problems on Linux as well.
Comment 7 James Blackburn CLA 2008-07-24 06:04:25 EDT
(In reply to comment #6)
> Sorry James but I am unable to reproduce your problems on Linux as well.

I can still reliably reproduce this (100% of the time so far).  Will try to make a screencast of what I'm doing later today.

I think I know what could be different.  In step 13 when I go to uninstall I only uninstall one of the ClearCase features -- the one without any children.  Perhaps this is somehow confusing p2?  The end result is, as Susan guessed in Comment #4, that the bundles.info contains references to plugins that don't exist in the plugins directory.

For reference I'm running on a RHEL4 platform with Sun Java 5 -- my Eclipse Java command looks like: 
../../jdk1.5.0_16/bin/java -Xms40M -Xmx768M -XX:MaxPermSize=256M -jar /projects/firepath/apps/work/jamesb/releases/eclipse/plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher /projects/firepath/apps/work/jamesb/releases/eclipse/eclipse -name Eclipse --launcher.library /projects/firepath/apps/work/jamesb/releases/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.100.v20080606/eclipse_1114b.so -startup /projects/firepath/apps/work/jamesb/releases/eclipse/plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar -exitdata ee30078 -vm ../../jdk1.5.0_16/bin/java -vmargs -Xms40M -Xmx768M -XX:MaxPermSize=256M -jar /projects/firepath/apps/work/jamesb/releases/eclipse/plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar


Comment 8 James Blackburn CLA 2008-07-25 04:42:01 EDT
(In reply to comment #7)
> (In reply to comment #6)
> > Sorry James but I am unable to reproduce your problems on Linux as well.
> 
> I can still reliably reproduce this (100% of the time so far).  Will try to
> make a screencast of what I'm doing later today.

I've but a screencast up of exactly what I'm doing here:
http://ned.ucam.org/~fjb31/bug241637_demo/bug241637.html

Comment 9 Pascal Rapicault CLA 2008-12-17 23:48:57 EST
*** Bug 244935 has been marked as a duplicate of this bug. ***
Comment 10 Pascal Rapicault CLA 2008-12-18 00:08:14 EST

*** This bug has been marked as a duplicate of bug 224615 ***