[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Metadata comparison

I don't mind if you want to keep the conversation here. But you chose not to, it would be great if you could keep this ML posted of the progress / new functionalities added. Thx.

On 2011-06-04, at 10:16 AM, Henrik Lindberg wrote:

I don't think the features (save as ecore, or compare) are available in the aggregator UI.

It is not difficult to do this in code though.

As you can see in https://bugs.eclipse.org/bugs/show_bug.cgi?id=304345 - the p2 model is available as a separate bundle. In code you can load repositories into the model, and then do what you want with the result (in your case -  save it in xmi format for comparison).

The issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=306980 is about being able to write a p2 ecore model as a p2 repo (i.e. the p2 meta data format). This feature is great for performing manipulations of p2 repositories - load them into a model, transform and write back as p2, but I don't think this is required in your use case.

Adding the end-user operation to save as ecore, or indeed to perform the comparison would be a great contribution to the aggregator project ;-)
If you choose to go ahead and solve this in code (either just a quick and dirty utility for your own use, or as a contribution), you can ask questions on the b3 forum/newsgroup. I may have some example code to look at etc. (not sure this is of interest to all on the p2-dev mailing list).

Regards

On Jun 3, 2011, at 9:41 PM, Henrich Kraemer wrote:

Hi Henrik,

Thank you for your suggestion. This seems very promising and so I went for it:

1. Starting with Eclipse 3.6.2 and installed additions for EMF-Compare and b3 aggregator via update sites mentioned on the Eclipse wiki.


2. Create a simple aggregator model in the Aggregator Model Editor:

<?xml version="1.0" encoding="UTF-8"?>
<aggregator:Aggregator xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:aggregator="http://www.eclipse.org/b3/2010/aggregator/1.0.0" label="first-test" buildRoot="build">
<configurations/>
<configurations operatingSystem="linux" windowSystem="gtk"/>
<contributions label="test">
<repositories location="C:\Components\Eclipse" mirrorArtifacts="false"/>
<repositories location="C:\Components\Equinox" mirrorArtifacts="false"/>
</contributions>
</aggregator:Aggregator>

3. This model builds fine and when it is opened with the Aggregator Model Editor I see two p2 repos and their contents as a tree which is very cool.

---

This is were I got stuck as I could not figure out how to get an EMF file of the p2 repositories.

Message http://www.eclipse.org/forums/index.php/m/521750/ mentions the ecore model for p2 and the need to supporting saving these files. However I did not find a way to save these so that I can use the EMF compare on it.

I tried selecting both p2 repo nodes in the Aggregator Model Editor and then compare via context menu entry 'Compare with -> Each Other' but that wasn't enabled. While this was not unexpected, that would be a great feature.

From https://bugs.eclipse.org/bugs/show_bug.cgi?id=306980 it appears I may need a newer version of the aggregator and to write code.
Is there an end user feature available in some newer version supporting this?


Thank you

Henrich

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

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