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

Bug 325925

Summary: [admin] P2 Agent installs features into wrong profile
Product: [Eclipse Project] Equinox Reporter: Martin Frey <martin.frey>
Component: p2Assignee: Pascal Rapicault <pascal>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: dave.korn.cygwin, irbull, pascal
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Martin Frey CLA 2010-09-22 03:14:32 EDT
Build Identifier: Agent from :http://www.eclipse.org/downloads/download.php?file=/equinox/drops/R-3.6-201006080911/equinox-p2-agent-3.6-win32.zip

With the new version of the P2 Agent there seems to be an issue with the selection inside profiles view. It happened now several times that i created a profile and dragged the org.eclipse.sdk.ide feature onto the new profile but it gets installed into the EquinoxProvisioningUI.

Unfortunately you don't see where the new features will be installed. This could be a nice enhancement to display anyway after the plugin resolution?

I was not able to reproduce it in a concrete way. First i thought its always the first profile in the list, but it's not that easy.

Because of this issue i can barely manage my profiles through the agent and for most of the time i end up installing a complete eclipse installation without provisioning.

Reproducible: Sometimes

Steps to Reproduce:
1. launch newly downloaded P2 Agent
2. create a new profile
3. DnD the eclipse sdk onto the new profile

4. sometimes (in my case most of the time) the feature gets installed into the EquinoxProvisioningUI.
Comment 1 DJ Houghton CLA 2010-09-22 11:27:03 EDT
So far I was able to reproduce this once but unfortunately not yet while in debug mode. (using the latest nightly build on Mac)
Comment 2 Dave Korn CLA 2010-10-01 00:49:28 EDT
Still happens in the 3.6.1 release at http://download.eclipse.org/equinox/drops/R-3.6.1-201009090800/index.php

I think a clue can be seen when you try and use the right-click context menu to install anything:

- select any random IU from a repo on the "metadata repositories" view
- right-click and select "Install" from the context menu

You get a warning pop-up with the text: "Problem determining user request.  Profile id: null, Selection count: 1".  This sound kind of like something was expecting both an IU and a profile to be selected, but it isn't because you're clicking in the other pane from where the profiles are, so only the IU is selected.  (You can multi-select IUs, and the "Selection count" figure goes up to match in the warning, but there's still never a profile id).  Note that it doesn't make any difference if you have zero, one or many profiles selected in the lower pane at the time.

Sounds like something's not plumbed together quite right in the UI to me.

As you can imagine, this makes the agent pretty unusable.
Comment 3 Martin Frey CLA 2010-10-01 06:35:40 EDT
I tried to investigate a bit more with this issue. From what i was able to debug i was that the org.eclipse.equinox.internal.p2.ui.admin.InstallAction, which creates the issue Dave mentioned, has only the MetaDataTable as a SelectionProvider and because of that it never gets the profileId updated. This explains at least why we get the message when using the metaview to install an artifact.

From the DnD Action i cannot tell yet why exactly it happens. I looks like that the DropAction instanciates such an InstallAction with the profile id correctly set.

I'll take another look once i got some spare time here.
Comment 4 Eclipse Genie CLA 2019-09-17 00:25:45 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.

--
The automated Eclipse Genie.