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

Bug 320494

Summary: [ui] PreselectedIUInstallWizard(ProvisioningOperationWizard).getNextPage(IWizardPage) changes the profile
Product: [Eclipse Project] Equinox Reporter: Krzysztof Daniel <krzysztof.daniel>
Component: p2Assignee: Susan McCourt <susan>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: krzysztof.daniel, pascal, xavier_robert
Version: unspecified   
Target Milestone: 3.7 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch which fixes the issue
none
Better patch none

Description Krzysztof Daniel CLA 2010-07-21 08:28:28 EDT
Reproduction steps:
1. Download the Eclipse provisioning
2. Create a new empty profile
3. Try to add galileo feature (for example sdk).

The error will appear that currently installed feature (provisioning) conflicts with the SDK 3.5.2.

I have debugged this a little bit, and PreselectedIUInstallWizard.recomputePlan replaces the valid profile with _SELF_.
Comment 1 Krzysztof Daniel CLA 2010-07-21 08:38:03 EDT
It looks like ProvisioningUI is created only with profile _SELF_ or null.
Comment 2 Pascal Rapicault CLA 2010-07-21 08:54:29 EDT
Could you please see if this is still a problem on 3.6?
Comment 3 Krzysztof Daniel CLA 2010-07-21 08:56:32 EDT
ProfilesView configures the InstallUIDropAdapter during startup when the tree is not configured yet.
Comment 4 Krzysztof Daniel CLA 2010-07-21 08:58:04 EDT
Created attachment 174845 [details]
Patch which fixes the issue

The issue happens in software checked out from HEAD.
The fix is not easy I think - my patch solves the problem, but it is a dirty hack.
Comment 5 Krzysztof Daniel CLA 2010-07-22 06:38:17 EDT
Created attachment 174956 [details]
Better patch
Comment 6 Susan McCourt CLA 2010-09-01 18:02:07 EDT
Fixed in HEAD >20100901.
The reason the fix seemed so awkward is that the InstallIUDropAdapter was ill-placed.  That code attempts to figure out "which profile" is the one you want, yet its constructor required a ProvisioningUI which is presumed to already know the profile in question.  Since the admin UI is the only place where the INstallIUDropAdapter makes sense, I moved the class and changed the constructor.  (The class was internal so this move is safe).
Comment 7 Susan McCourt CLA 2010-09-02 18:18:30 EDT
*** Bug 322138 has been marked as a duplicate of this bug. ***
Comment 8 Susan McCourt CLA 2010-09-14 13:46:11 EDT
retargeting milestone.
These changes were released to HEAD for M2, but never tagged for the M2 I-builds.  Since we are already into the test pass, we will defer to M3.
Comment 9 Susan McCourt CLA 2010-10-27 16:04:40 EDT
Verified on win7, Build id: I20101026-2000.