Bug 202985 - [prov] [repo] Store repositories in the profile
Summary: [prov] [repo] Store repositories in the profile
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.5 M4   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 213037 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-11 15:07 EDT by DJ Houghton CLA
Modified: 2008-12-01 23:14 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2007-09-11 15:07:28 EDT
We should create a new preference scope that refers to the agent data area and we can store our repository preferences there.
Comment 1 Pascal Rapicault CLA 2007-09-18 08:38:29 EDT
This would be a good first step, however given that we want to store repos on a per profile basis we may need something else, or simply not use preferences to store this information. For example we had talked about storing the repos to be used in a "meta" profile. 
Comment 2 Susan McCourt CLA 2007-12-16 20:12:30 EST
*** Bug 213037 has been marked as a duplicate of this bug. ***
Comment 3 John Arthorne CLA 2008-02-07 11:19:46 EST
Do we even need this for 1.0? Sounds cool, but I can't think of a pressing use case that needs it.
Comment 4 Pascal Rapicault CLA 2008-02-07 15:30:03 EST
It may not be necessary, but we need to find a way to set repositories when looking for updates in the end user ui, when the product has been laid down with the admin ui.
Comment 5 John Arthorne CLA 2008-12-01 23:14:17 EST
Here is what I have done:

 - There are two touchpoint actions (AddRepositoryAction and RemoveRepositoryAction) that can manipulate the set of repositories associated with a profile
 - These associated repositories are stored in the profile registry (in profile properties)
 - This set of associated repositories is only manipulated via engine operations as dictated by the metadata of some IU
 - When a profile is started, its associated repositories are "published" into the current configuration, and are stored in the configuration area as we have done in the past

This distinguishes "built in" repositories that are added to a profile by some IU from other repositories that are added later by the user or some other plug-in. I'm not 100% sure on the direction but this has some interesting properties. For example this would allow recovery from a changed configuration location or lost configuration preferences.

Publishing the associated repositories on startup is a bit of a hack. Ideally I would want all the logic for this hidden in the Eclipse touchpoint rather than have the profile registry aware of it. What is really needed here is a "finalize" phase where touchpoints can run some code after starting the newly provisioned profile. This would allow us to avoid adding this data in a profile property altogether.