Community
Participate
Working Groups
The Composite metadata and artifact repositories load the child repos using the default repo manager services. If the composite repo was created using some other agent location, then it will end up using the incorrect repo manager to load the children. It seems like the composite repos will need to keep a reference to the agent they were created under.
A variation of this is that ICompositeRepository#getChildren(), which returns a list of URIs, can't really be used correctly without knowing the agent used for the composite. We would need to either change getChildren to return a list of IRepository, or add a new method ICompositeRepository.getManager(). We don't really need to keep the agent, only the IRepositoryManager.
The list of child URIs could be useful as URIs especially if some children are not reachable. perhaps we want List<URI> getChildren List<IRepository> getChildRepositories
(In reply to comment #1) > A variation of this is that ICompositeRepository#getChildren(), which returns a > list of URIs, can't really be used correctly without knowing the agent used for > the composite. I don't see anyone doing anything interesting with the result of getChildren() today that would require this. The only references outside of tests today are of the form getChildren().length > 0 (i.e., they really just need a hasChildren() method). We could add a new method that returns the loaded child repositories, but clients shouldn't actually need this - the composite effectively "contains" all of the elements that are contained in the children so any additional query on the children would be redundant.
As part of bug 293340, I was looking at moving the CompositeRepository.validate stuff out of CompositeRepository and into the repo.tools bundle. This would require getting the children.
I have fixed the problem in p2 API branch of using the wrong agent. The repository manager is now passed into composite repositories on construction. I haven't added a getChildRepositories method, but Andrew feel free to add one if you find a need for it.