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

Bug 233183

Summary: [ui] repo unavailable but install button is trying to do something
Product: [Eclipse Project] Equinox Reporter: Benno Baumgartner <benno.baumgartner>
Component: p2Assignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, john.arthorne, susan
Version: unspecifiedFlags: john.arthorne: review+
dj.houghton: review+
Target Milestone: 3.4 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
screen shot
none
patch to InstallAction
none
Updated patch none

Description Benno Baumgartner CLA 2008-05-21 06:25:37 EDT
I20080520-2000

Given fresh workspace
1. Go to Help>Software Updates...>Available Software
2. Add site to http://www.eclipse.org/mylyn/downloads/
4. Check the checkbox for the site -> no repository found:-(
5. Press install -> more no repository found messages
6. On empty dialog press Finish
Is:
 Something is installed, I'm asked to restart eclipse. After the restart mylyn is not installed.
Should:
 Not allow me to install anything, this is not the correct update site URL for mylyn.
Comment 1 Susan McCourt CLA 2008-05-21 11:42:08 EDT
>5. Press install -> more no repository found messages

Benno, do you remember if these messages were about other repositories or the same one?  We remember if we reported a "not found" and don't report again unless you refresh.  So it sounds like other repos were not found.  Could your connection have been down?

Another issue is that the install button was still enabled.  That one puzzles me.  Once you pressed it, it would have tried to resolve an install (against what?) and that would have contacted all the other repos.

Can you reproduce?  I'll mark this RC2 for investigation.  At a minimum, we need to understand why the install button is behaving as if you've selected something, and what it thinks you are trying to install.
Comment 2 Susan McCourt CLA 2008-05-21 11:42:41 EDT
retitling so I'll recognize the issue.
Comment 3 Benno Baumgartner CLA 2008-05-21 12:04:28 EDT
(In reply to comment #1)
> >5. Press install -> more no repository found messages
> 
> Benno, do you remember if these messages were about other repositories or the
> same one? 

I'm pretty sure that the messages were speaking about the same repository.

> We remember if we reported a "not found" and don't report again
> unless you refresh.  So it sounds like other repos were not found.  Could your
> connection have been down?

Unlikely.

> Another issue is that the install button was still enabled.  That one puzzles
> me.  Once you pressed it, it would have tried to resolve an install (against
> what?) and that would have contacted all the other repos.
> 
> Can you reproduce?  I'll mark this RC2 for investigation.  At a minimum, we
> need to understand why the install button is behaving as if you've selected
> something, and what it thinks you are trying to install.

I can reproduce that Install is enabled and leads to an empty install dialog which allows me to press finish. But after doing so I'm not asked anymore if I want to restart eclipse.
Comment 4 Susan McCourt CLA 2008-05-21 12:08:29 EDT
Can you please attach a screenshot of the empty install dialog?  
Comment 5 Susan McCourt CLA 2008-05-21 12:09:01 EDT
(I'm assuming it's not completely empty...ie, I'm looking to see what messages are shown up top and down in the details).
Comment 6 Benno Baumgartner CLA 2008-05-21 12:20:34 EDT
Created attachment 101308 [details]
screen shot

(In reply to comment #4)
> Can you please attach a screenshot of the empty install dialog?  
> 

Yep, empty
Comment 7 Susan McCourt CLA 2008-05-22 14:21:45 EDT
Created attachment 101580 [details]
patch to InstallAction

The easiest way to see this problem is to checkmark an unavailable repository (one that has already issued an error and shows no children, or one that has not been expanded).  You end up with the repo checked, but no children.

The install action was not restrictive enough in what the selections could be.  It was intended to allow the inclusion of category or site objects in addition to IU's, and the actual run of the action filtered out non-IU's.  The problem here was that the enablement code needed to ensure that at least one IU (that is not a category) must be selected.

This fixes the bug in the SDK UI.  In the admin UI, this means where you could previously select, say, a metadata repo and see the install action, now you must also select an IU.  (Mixed selections are allowed with the intention to install the non-category IU's).
Comment 8 Susan McCourt CLA 2008-05-22 14:22:22 EDT
John, please review and find a second...thanks.
Comment 9 Susan McCourt CLA 2008-05-22 17:57:48 EDT
DJ said he could also review this before the 1am build
Comment 10 John Arthorne CLA 2008-05-22 20:52:26 EDT
Created attachment 101668 [details]
Updated patch

Previous patch gave the correct result, but this update will short-circuit the isEnabled check as soon as a valid non-category IU is found.
Comment 11 John Arthorne CLA 2008-05-22 20:56:27 EDT
Reviewed and released.