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

Bug 231632

Summary: [ui] - available IU group should not try to load disabled repos
Product: [Eclipse Project] Equinox Reporter: Susan McCourt <susan>
Component: p2Assignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne
Version: 3.4Flags: john.arthorne: review+
Target Milestone: 3.4 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch to add event handling none

Description Susan McCourt CLA 2008-05-12 14:51:29 EDT
The available IU group tries to load newly added repos and make them visible so that the user can see what got added.  This has gone on for some time, although in bug 230386, we moved the load work to a background job.

However, this code was never changed to check whether a repo is enabled or disabled before doing the load once the support for disabled repos was added.

Further, we have repos now that may cause several other repos to get added while they are loading.

We need to ensure that the UI doesn't load the repos if they are not enabled.
Comment 1 Susan McCourt CLA 2008-05-12 14:52:59 EDT
there was some code that tried to do something like this by ignoring an add that followed a discovered repo.  This is bogus because we can't be sure in the case of multiple discovers that there is any order to the discover and add sequence.
Comment 2 Susan McCourt CLA 2008-05-12 15:09:22 EDT
Created attachment 99787 [details]
patch to add event handling

Patch that checks the enabled state of a repo before deciding to load it and make it visible.
Comment 3 Susan McCourt CLA 2008-05-12 15:10:56 EDT
John, can you please review this patch?
It definitely helps with the speed of filtering when a repo that references other repos is being loaded.  I consider it low risk because it only affects the event handling in the available software view, and this was doing special work in the add.  It doesn't affect the other listener clients (such as the repo manipulation dialog or the admin UI).
Comment 4 John Arthorne CLA 2008-05-12 15:55:13 EDT
Yep, looks good. This may result in repositories being loaded more eagerly in some cases, where you were previously ignoring them (discovered enabled repositories).  However, I think this is the correct behaviour.
Comment 5 Susan McCourt CLA 2008-05-12 16:13:45 EDT
Fixed in HEAD >20080512.