Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 230412 - Unable to uninstall features via old UM UI
Summary: Unable to uninstall features via old UM UI
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 RC1   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-06 11:22 EDT by DJ Houghton CLA
Modified: 2008-05-06 18:13 EDT (History)
0 users

See Also:
john.arthorne: review+


Attachments
patch (8.86 KB, patch)
2008-05-06 11:22 EDT, DJ Houghton CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2008-05-06 11:22:40 EDT
Created attachment 98856 [details]
patch

Created from bug 228517. 

- start Eclipse
- install feature via old UM UI
- restart
- uninstall feature via old UM UI

Note that feature is re-installed.

This is how the old update manager uninstalls features:

- it removes the feature from the list of features in the site in the platform.xml
- (for a USER-EXCLUDE policy) it adds all the file paths for all of the feature's bundles to the site policy's plug-in list
- it drops a file (configuration/org.eclipse.update/toBeUninstalled) which contains a list of all the feature names that will be uninstalled along with their corresponding site url from the platform.xml
- on startup, the plug-ins are ignored because of their include in the plug-in list in the site policy
- the update.scheduler bundle adds an extension to the UI's earlyStartup extension point which goes and looks for the toBeUninstalled file
- the file is parsed and it is determined what needs to be removed from the file-system and deletion is done
- platform.xml is updated (the files are no longer needed in the site policy's plug-in list) 

I have attached a patch which handles the filtering out of the features that are contained in the toBeUninstalled file. (the bundles are already filtered out via the site policy filter list).
Comment 1 John Arthorne CLA 2008-05-06 17:01:30 EDT
+1 on this patch. There is a remaining issue with uninstalling a feature installed into a different site, but this patch enables the basic uninstall case and moves us in the right direction.
Comment 2 DJ Houghton CLA 2008-05-06 18:13:23 EDT
Created bug 230508 to address open issue about uninstalling from an extension location.

Closing.