[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Querying remote p2 repositories

You were on the right track - what you want is a "p2 area" that is used for the purpose of answering your queries. You want that to be separate from the "p2 area" used in the application that wants the answers to those queries - or you will pollute the runtime with queried meta data (caches etc.). This way you can decide if you want to keep the cached data for the next invocation (able to answer queries faster if nothing has changed in the repositories you are querying etc).

Not sure if there is any command line "p2 query" utilities around.

One approach is to use the b3 aggregator project's EMF model of p2 repositories (it can load p2 repositories using the p2 api's, it allows manipulation of the repository and you can write it out again as a p2 repository. But guess this is just as difficult in your Maven/Tycho context as using a p2 agent and a p2 query. OTOH, the b3 aggregator is a tool for performing slicing/dicing/validation/aggregation/mirroring and reauthoring of p2 repositories - maybe what you want to do falls into this category? 

Hope that helps.

- henrik

On Jul 27, 2012, at 15:42, Kopecz, Klaus wrote:

I'm looking for a simple way to query a remote p2 repository (simple and/or composite). The p2-API documentation at help.eclipse.org indicates that this can be done in the context of having a ProvisioningAgent representing the "p2 area" of an Eclipse installation.
My context is different. I want to query a p2 repository in the context of a Maven/Tycho build and therefore cannot refer to any profile or "p2 area". Therefore, I'm looking for some basic p2 infrastructure which can read (or even query) the metadata of a remote repository basically by providing the URL. While I could write some stuff to read and analyze a remote content.xml file, things get more complex if I want to abstract from having simple and/or composite repositories which differ in their file layouts and decomposition into multiple metadata sources. Having something which could do this abstraction for me would be helpful.
Thanks for any suggestions ...
p2-dev mailing list