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

Bug 293369

Summary: [reconciler] Problems during reconciliation after uninstalling nested features via Update Manager
Product: [Eclipse Project] Equinox Reporter: DJ Houghton <dj.houghton>
Component: p2Assignee: DJ Houghton <dj.houghton>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: Ed.Merks, jcibsen, john.arthorne, pascal, pwebster
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description DJ Houghton CLA 2009-10-26 17:17:39 EDT
Consider the case where we have an old-style update site with 2 features A and B where A includes B. 
- enable Classic Update Manager capability
- install A via old update manager
- restart
- Manage Configuration, select A, choose to Uninstall it
- restart

Note that B is still installed.

When the Update Manager wants to uninstall a feature, it writes out the feature name in the "toBeUninstalled" file and on the next startup, it uninstalls it. We have code in p2 which reads this file and determines if the feature that we see is on our list of things which are going to be removed. Unfortunately only the top level feature (in our case, A) is listed in the file so when we read it, we don't pick up that B is on the list of things to uninstall too so it ends up remaining in the installation.

I've debugged through the old UM code (in Eclipse 3.3.2) and it looks like it creates configuration state objects based on the install history and determines that the nested feature (B) should be uninstalled from that. 

I will investigate further. The p2 code to look at is in SiteListener. The UM code is in ScheduledPluginUninstall.
Comment 1 DJ Houghton CLA 2009-10-28 13:36:06 EDT
For my reference:

SiteFile#remove is the code which reads the toBeUninstalled file and removes the feature and its associated plug-ins. It then recursively checks all of that feature's included features and if they are not referenced by any other features, then it also removes them.
Comment 2 Eclipse Webmaster CLA 2019-09-06 16:13:22 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.
Comment 3 Ed Merks CLA 2020-02-20 02:30:38 EST
I assume that "classic update sites" are a rare corner case these days.