[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [p2-dev] How to query feature's plugins/IUs from p2 metadata?

Hi,

 

>Could you please tell more about what is the final goal?

Yes, sorry for the unclear message.

 

We are developing a GUI tool that is used to manage different P2 update repositories.

Its main purpose is to allow users to manage P2 update repositories with ease so that

the server/repository remains always functional (metadata is correct for other P2 based

update/install tools).

 

Some of its features include

-          Adding IU

-          Modifying IU

-          Deleting IU ( including deleting obsolete IUs from the repositories safely, e.g. taking care of dependencies etc.)

-          Category management

-          Other repository management stuff

 

At the moment I would like to show to the users detailed information about different IUs that they have selected from the GUI.

Currently we are showing the basic stuff like repository name, IU name, IU version etc.

 

Now I would like to show which IUs from the repository actually belongs to (are part of) the selected IU (or feature) .

Just like they were previously listed in the feature.xml file, when feature’s plugins were listed inside <plugins> -tag.

 

>Relying on the shape of the metadata can only get you so far since the mapping between features and metadata is not API and could be changed in the future.

We are quite familiar with the P2 API. I have been following its progress closely since early 2009 and tested its functionality quite much. The lack of decent

documentation / use cases has been a bit of concern to our development team. Fortunately it has been improved over these Eclipse 3.6 M? and RC? releases.

 

I agree that it is not reasonable to rely on structure of the p2 metadata file. The QueryUtil (from import org.eclipse.equinox.p2.query.QueryUtil package)

and its functionality seems a good starting point to retrieve different information from the metadata but I have not quite figured it out yet, thus

my question here.

 

Can we use QueryUtil or what is your opinion how this information should be retrieved?

 

Best Regards, Mika Immonen

 

 

From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Pascal Rapicault
Sent: 25. toukokuuta 2010 21:14
To: P2 developer discussions
Subject: Re: [p2-dev] How to query feature's plugins/IUs from p2 metadata?

 

Could you please tell more about what is the final goal?

 

Relying on the shape of the metadata can only get you so far since the mapping between features and metadata is not API and could be changed in the future.

 

 

On 2010-05-25, at 6:53 AM, <Mika.Immonen@xxxxxxxxx> <Mika.Immonen@xxxxxxxxx> wrote:



Hi,

 

I'd need to query plugins that belong to a certain feature (defined with <plugin>-elements on feature.xml).

 

My current functionality gets the requirements with org.eclipse.equinox.p2.metadata.getRequirements() method and then removes those requirements that are not found as installable units on repository.

Drawback of this approach is it lists even those requirements that are not listed as <plugin> in the feature.xml.

 

The query also lists feature itself not just the plugins. Features seem to have (org.eclipse.update.install.features=true) filter defined on metadata, but can I trust that all features have it and no plugin will have it?

 

So in short: is it possible to get a listing of <plugin> elements defined for a feature?

 

Best regards,

 

Mika Immonen, Senior Software Developer
Tieto Finland Oy, R&D Services

 

 

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev