Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 226759 - Support selective enablement of repositories
Summary: Support selective enablement of repositories
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.4 M7   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 224999 228097
  Show dependency tree
 
Reported: 2008-04-11 16:41 EDT by John Arthorne CLA
Modified: 2008-04-22 20:12 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2008-04-11 16:41:12 EDT
In Update manager, the user always had to select an individual site on which the subsequent install or update would operate. In p2, we don't force the user to choose a site, and everything is lumped together - all sites are consulted during every install/update operation.  This is simpler for the user, but likely won't scale with a large number of repositories available.  We should consider adding an enablement flag in the repository managers so the user could exclude certain sites from consideration without entirely deleting them from the list.
Comment 1 Susan McCourt CLA 2008-04-14 12:47:39 EDT
I will use bug #218534 to track the UI side of this.
Comment 2 John Arthorne CLA 2008-04-22 17:36:49 EDT
I have released support for this in the repository manager APIs. Both managers now have a setEnabled(URL, boolean) method that allows a client to toggle whether a repository is enabled or not. Disabled repositories are excluded when calling getKnownRepositories unless the IRepository.REPOSITORIES_DISABLED flag is set. This allows a client to query for disabled repositories, but they will not appear for other kinds of queries.

When broadcasting a discovery event, the event emitter can specify if the repository should be enabled or not by default. A new constructor was added to RepositoryEvent, and a new isRepositoryEnabled() method.
Comment 3 Susan McCourt CLA 2008-04-22 20:12:20 EDT
I had to add a getEnabled(URL location) to each repo manager so that the UI could properly display the enabled/disabled status when showing a full list of repos.  Otherwise I would have had to query the repos with flags and then search the repo list for the repo in hand.  

This seemed a reasonable addition since we already had getRepositoryProperty(URL location, String name).