Yes I can see the repository cache being cleared when I programmatically remove repositories.
As for the binary cache in the core, that's because my repos use customized binary packages. That explains why my .blobstore getting so big. Thanks for the new bug it will help P2 be more robust as a general software delivery mechanism. By the way, pragmatically I can't use the IArtifactRepository.removeAll() because that will remove other binaries from Eclipse repos, like CVS. I will use the removeDescripors(IArtifactKeys[]) methods to remove those artifacts belonging to my own repos. Thanks, Andy From: Pascal Rapicault <[email protected]<mailto:[email protected]>> Reply-To: P2 developer discussions <[email protected]<mailto:[email protected]>> Date: Monday, 26 November, 2012 7:30 PM To: P2 developer discussions <[email protected]<mailto:[email protected]>> Subject: Re: [p2-dev] How to delete org.eclipse.equinox.p2.core/cache programmatically? This cache stays here because we never got around to hook it up to the p2 garbage collector… Up to this point, this had never been an issue because people delivered little binary content outside of their plugins. I thought we had a bug about it but could not find it so I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=395127 Note that the caches in org.eclipse.equinox.p2.core/cache and org.eclipse.equinox.p2.repository/cache serve different purpose. The first one is here to store the binary artifacts before they get processed (e.g. unzipped, etc.), while the other caches the p2 metadata files (content.jar, composite.jar, artifacts.jar, etc.) from remote repositories. The latter should be cleared when repositories are removed from the repository manager. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Andy Jin Sent: November-26-12 3:07 PM To: P2 developer discussions Subject: Re: [p2-dev] How to delete org.eclipse.equinox.p2.core/cache programmatically? Thanks Pascal. Yes, all the items in the .blobstore directory are downloaded binaries. I am wondering why does P2 keep this cache? We already have another cache in "p2/org.eclipse.equinox.p2.repository/cache" which holds repository contents.jar and artifacts.jar files. If we keep all the downloaded artifacts in p2/org.eclipse.equinox.p2.core/cache is there a p2 policy to delete old files (older than some days)? If not we will use up a lot of disk space. From: Pascal Rapicault <[email protected]<mailto:[email protected]>> Reply-To: P2 developer discussions <[email protected]<mailto:[email protected]>> Date: Monday, 26 November, 2012 2:12 PM To: P2 developer discussions <[email protected]<mailto:[email protected]>> Subject: Re: [p2-dev] How to delete org.eclipse.equinox.p2.core/cache programmatically? This cache is an ArtifactRepository so you should be able to flush it using the removeAll() method. You can load this repository from the IArtifactRepositoryManager. The URI for this repo can be computed as follow: IAgentLocation location = getAgentLocation(agent); if (location == null) returnnull; return URIUtil.append(location.getDataArea("org.eclipse.equinox.p2.core"), "cache/"); //$NON-NLS-1$ //$NON-NLS-2$ You are saying that you have a lot of item in the .blobstore, can you confirm that these are all binaries? From:[email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Andy Jin Sent: November-26-12 1:51 PM To: P2 developer discussions Subject: [p2-dev] How to delete org.eclipse.equinox.p2.core/cache programmatically? I am working on a feature in our RCP product to install software from customized P2 repositories. Each build of that software produces one dedicated repository (labelled with the build id to make it unique). Everything works fine. P2 can install multiple release builds of the software. However, I find out the "eclipse/p2/org.eclipse.equinox.p2.core/cache" directory grows very big after I install several builds? Especially the ".blobstore" directory contains all the downloaded artifacts. Is there a way to programmatically delete this cache? Thanks, Andy
_______________________________________________ p2-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/p2-dev
