Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 274704 - [director] uninstall fails without explicit version
Summary: [director] uninstall fails without explicit version
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.5 RC1   Edit
Assignee: Thomas Hallgren CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-01 18:35 EDT by Terry Parker CLA
Modified: 2009-05-06 21:33 EDT (History)
1 user (show)

See Also:
pascal: review+


Attachments
Return an empty Collector when collecting rootIUs for uninstall operations (7.52 KB, text/plain)
2009-05-01 19:52 EDT, Terry Parker CLA
no flags Details
Patch for the DirectorApplication (2.38 KB, patch)
2009-05-06 02:45 EDT, Thomas Hallgren CLA
pascal: iplog+
Details | Diff
Patch for the DirectorApplictionTest (3.01 KB, patch)
2009-05-06 02:47 EDT, Thomas Hallgren CLA
pascal: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Terry Parker CLA 2009-05-01 18:35:06 EDT
Build ID: 3.5 M7

Steps To Reproduce:
1. Install org.eclipse.cdt.feature.group/5.0.1.200809120802 from http://download.eclipse.org/tools/cdt/releases/ganymede into a profile.
2. Leave the http site enabled in the profile
3. Launch the newly-created org.eclipse.equinox.p2.director app with the following arguments:
-uninstallIU org.eclipse.cdt.feature.group -destination <profile_location> -profile SDKProfile

More information:
Because the http site is in the target's profile, it gets loaded and LatestIUVersionQuery returns version 5.0.2 of the UI. In this case since 5.0.2 wasn't installed, it reports success while leaving the 5.0.1 version installed.

The search space for uninstalls should be limited to what is actually installed in a profile.  This should be true even if a "-repository" argument is provided on the command line.
Comment 1 Terry Parker CLA 2009-05-01 19:52:19 EDT
Created attachment 134136 [details]
Return an empty Collector when collecting rootIUs for uninstall operations
Comment 2 Pascal Rapicault CLA 2009-05-01 21:53:09 EDT
Were you using the new director application or the old one?
Comment 3 Terry Parker CLA 2009-05-03 10:57:08 EDT
The new one.  The patch contains a test for the new application.  I'll play with the tests some more.  The parameters for the two apps are close enough that I think we can run both with the same input parameters, so we should update the tests to do that.  

This problem may exist in the older application as well.  What made me find it with the new application is the fact that you can use it to do an update.  With this patch, passing the parameters "-uninstallIU <my.iu> -installIU <my.iu> -repository <recently_updated_repo>" without any explicit versions will successfully update a profile to the latest version in the repo, no matter what what version is currently installed in the profile.
Comment 4 Thomas Hallgren CLA 2009-05-06 02:45:11 EDT
Created attachment 134575 [details]
Patch for the DirectorApplication

This patch contains a simplified version of Terrys patch. There's no need to call collectRootIUs at all when uninstalling since that method only acts on the provided repositories.

The patch does not contain the tests.
Comment 5 Thomas Hallgren CLA 2009-05-06 02:47:26 EDT
Created attachment 134576 [details]
Patch for the DirectorApplictionTest

This patch contains Terrys test, now added to the DirectorApplicationTest (the test suite for the new director application).
Comment 6 Pascal Rapicault CLA 2009-05-06 21:33:05 EDT
Patch reviewed and released.