Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Trying to use SynchronizeOperation

Btw, this should be fixed in today's I build.

On 2011-05-12, at 10:09 AM, David Orme wrote:

For anyone following along or interested in this, work on this is being tracked in the following bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=345284

A secondary outcome is that the Git repo below will wind up containing an example of how to use this new API.


Dave

On Mon, May 9, 2011 at 4:40 PM, David Orme <djo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi Pascal, all:

Overview:

I haven't been able to get the new SynchronizeOperation to work properly.  I've created a small example reproducing my problem and pushed it to GitHub at:


It's all built using Maven/Tycho and there's a README file documenting the shape of the file structure in the distribution.  If you 'mvn clean install' in the folder with the root pom, all required dependencies will be built and a JUnit test will run, illustrating what I'm trying to do and what it is doing instead.


Detail:

I've been trying to get the new SynchronizeOperation to work, with limited success.  Here's the scenario:

1) Export test.app.product to c:\temp.  Wind up with:

c:\temp\test.app\eclipse
c:\temp\test.app\repository

2) Create a bundle, feature, site.xml (payload, payload.feature, payload.site) and build it.  Make payload.site accessible via some web server.  (The "payload" bundle only depends on "org.eclipse.runtime".)

3) In the test fixture application, in the SynchronizeOperation code, create a compound IQueryable pointing at both c:\temp\test.app\repository and payload.site.  Ask for all IUs in both places.

4) Feed that query result into the SynchronizeOperation.  The problem I've encountered is that the resulting update operation doesn't install payload.feature nor the payload bundle.

The fixture writes all installed Features to System.err at exit and the unit test reads these and tests expectations based on what is in or not in this list.  There's also a fair bit of logging in the fixture, so you can see what IUs it's attempting to install/update.

5) I've made a small example that uses Maven/Tycho to demonstrate 100% of this and pushed it up to GitHub:


Just follow the README instructions to reproduce.  You can either manually export the fixture as described above or you can run it immediately using Maven/Tycho (it can find and run the fixture automatically if the test is run through Maven/Tycho).

Please let me know what else I should try or what I might be doing wrong.  Thanks in advance.


Regards,

Dave Orme


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


Back to the top