Bug 247664 - Repositories remain open after MirrorApplication has finished
Summary: Repositories remain open after MirrorApplication has finished
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Andrew Cattle CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on: 248269
Blocks:
  Show dependency tree
 
Reported: 2008-09-17 11:07 EDT by Andrew Cattle CLA
Modified: 2008-11-05 16:09 EST (History)
2 users (show)

See Also:


Attachments
Checks if a repository is already open and removes repositories accordingly after application has finished (5.94 KB, patch)
2008-10-01 09:41 EDT, Andrew Cattle CLA
dj.houghton: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cattle CLA 2008-09-17 11:07:27 EDT
Repositories are not removed from the repo manager after MirrorApplication finishes mirroring an artifact repository.

see org.eclipse.equinox.p2.tests.mirror.BasicMirrorApplicationTest.java for more detail.
Comment 1 Andrew Cattle CLA 2008-09-17 14:56:25 EDT
Forgot to mention that org.eclipse.equinox.p2.tests.mirror.BasicMirrorApplicationTest.java is currently not checked in. I'll post another comment when it is.
Comment 2 Andrew Cattle CLA 2008-09-24 10:15:34 EDT
I have a temporary solution in my workspace that I've tested (with Bug 248056 in mind) but I'm not submitting a patch because it relies on my temporary solution to Bug 248269, which won't be in the released code.
Comment 3 DJ Houghton CLA 2008-09-29 17:04:55 EDT
To describe this problem in more detail:

Repositories loaded by the repository manager are not only cached in memory, but they store information in the preference store. Therefore, if you call the mirror application on a repository that isn't already loaded, you want to remove it from the repo manager when the mirroring is finished.
Comment 4 Andrew Cattle CLA 2008-10-01 09:41:33 EDT
Created attachment 113987 [details]
Checks if a repository is already open and removes repositories accordingly after application has finished

This patch casts the repository managers as their respective concrete types. This is currently necessary to take advantage of the contains method included in the manager's abstract class but not interface. This should be changed when the API is updated (see Bug 248269 for more detail).
Comment 5 DJ Houghton CLA 2008-10-01 11:20:12 EDT
Thanks Andrew. Patch released to HEAD.