[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] No PossibleUpdates from UpdateSite via UpdateOperation

hi !

as a hint for other developers:
regarding this problem i discovered that i installed the new IUs using ProvisioningHelper.install and updated wit UpdateOperation which updates by default only IUs with the property IProfile.PROP_PROFILE_ROOT_IU set. now i'll use InstallOperation which sets the property automatically.

greetings,
michael


Am 28.04.2010 um 16:24 schrieb Michael Mangeng:

Hi all!

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 :-)
(works perfectly)

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();
ProvisioningHelper.refreshRepositories();
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 :-=)

version: I20100428-0100

greetings,
michael



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