|[p2-dev] No PossibleUpdates from UpdateSite via UpdateOperation|
I've got a little problem with updates. (This worked before for me but i can't find out what is wrong...)
I've created a little website which can be used to manage our server (the website is used to perform p2 actions).
If i display new software to install (which is fetched from a update site) i can see - e.g. a driver package - version 1.0.0
=> i install it using code borrowed from ProvisioningHelper :-)
then i change something in the impl, of the driver and increment the version of the plugin. afterwards i increment the version of the feature.
(e.g. 1.0.0 => 1.0.1)
then i export the feature in eclipse and flag the "generate metadata repository" in feature export. (directly into the repository created during product export)
(the repository is exposed with a local running webserver)
in my website i see the new version 1.0.1 of the feature
(metadataRepoMgr.query(QueryUtil.createIUGroupQuery(), new NullProgressMonitor());)
the problem: if a create an UpdateOperation i don't get the update entry:
IProvisioningAgent agent = ServiceComponent.getInstance().getProvisioningAgent();
ProvisioningSession session = new ProvisioningSession(agent);
UpdateOperation operation = new UpdateOperation(session);
operation.setProfileId(ServiceComponent.getInstance().getCurrentProfile()); //currentprofile is hardcoded to "profile"
IStatus status = operation.resolveModal(new NullProgressMonitor());
=> no updates listed in getPossibleUpdates()....
what are the steps p2 does to check whether there is a update for a installed feature or not?
i took a look at UpdateQuery and saw that iu-id has to match and version has to be greater - but if this is all it should work.
i've got only 1 profile in the system called "profile". if i drop the setProfileId call or use IProfileRegistry.SELF instead, it's the same.
i hope somebody drops me a hint where i can search :-=)