Profile properties preventing p2 update [message #559723] |
Fri, 17 September 2010 17:04 |
Patrick Paulin Messages: 44 Registered: July 2009 Location: Madison, Wisconsin |
Member |
|
|
We currently have a p2 auto-update (Eclipse 3.5) process that manages IUs at a low level. This means that during an update we add and remove every relevant IU (bundles, tooling, etc.)
We're trying to switch to auto-update logic that deals only with high-level IUs (features and products), allowing p2 to deal with the low-level details.
The problem is that we can't update from the old logic to the new logic. We've narrowed down the problem to iuProperties entries in the profile. The old logic resulted in iuProperties entries for each low-level IU, and the properties are usually:
<property name='org.eclipse.equinox.p2.internal.inclusion.rules' value='STRICT'/>
The new auto-update logic is attempting to install just the high level features and products but my guess is that the planner is saying "Hey, you need to install these low level IUs too". The actual error message looks like this:
Status severity= 4, code = 1, message = Cannot complete the install because of a conflicting dependency.
Status contains child status objects
Status severity= 4, code = 0, message = Software being installed: Product Name 1.0.0.1009170900-8505 (com.company.app.application.product 1.0.0.1009170900-8505)
Status severity= 4, code = 0, message = Software currently installed: toolingcom.company.app.application.product.configuration 1.0.0.1009170845-8505
Status severity= 4, code = 1, message = Only one of the following can be installed at once:
Status contains child status objects
Status severity= 4, code = 0, message = toolingcom.company.app.application.product.configuration 1.0.0.1009170900-8505
Status severity= 4, code = 0, message = toolingcom.company.app.application.product.configuration 1.0.0.1009170845-8505
Status severity= 4, code = 1, message = Cannot satisfy dependency:
Status contains child status objects
Status severity= 4, code = 0, message = From: Product Name 1.0.0.1009170900-8505 (com.company.app.application.product 1.0.0.1009170900-8505)
Status severity= 4, code = 0, message = To: toolingcom.company.app.application.product.configuration [1.0.0.1009170900-8505]
What I'm wondering is:
* Does it make sense that these profile iuProperties entries would cause a problem like this? If I remove the entries, the update runs successfully.
* Is there any way to programmatically remove the iuProperties entries?
* Has any work been done in 3.6 that would improve how the planner handles this situation? It would take some work to migrate, but it would be worth it to resolve this issue.
Thanks in advance for any help.
Patrick Paulin
Eclipse RCP/OSGi Trainer and Consultant
Modular Mind, Ltd.
patrick@modumind.com
www.modumind.com
twitter.com/pjpaulin
linkedin.com/in/pjpaulin
|
|
|
|
Re: Profile properties preventing p2 update [message #651683 is a reply to message #559723] |
Tue, 01 February 2011 09:23 |
Bernardo Buffa Colome Messages: 2 Registered: February 2011 |
Junior Member |
|
|
Hi,
Could you give us more detail about your solution?
We are trying to modify the iuProperties map on the profile, but every time we ask for the profile to the IProfileRegistry (SimpleProfileRegistry) .getProfile(String profileId), the instance returned is a fresh snapshot.
...
public static final String INCLUSION_RULES_KEY = "org.eclipse.equinox.p2.internal.inclusion.rules";
IProfileRegistry reg=(IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
IProfile profile = reg.getProfile(IProfileRegistry.SELF);
Profile pf=(Profile)profile;
Iterator<IInstallableUnit> units=pf.everything();
while(units.hasNext()) {
IInstallableUnit iu=units.next();
logger.log(ILog.INFO, "IU: " + iu.toString() + ", \"" + INCLUSION_RULES_KEY + "\"=\""+ pf.getInstallableUnitProperty(iu, INCLUSION_RULES_KEY)+"\"");
pf.setInstallableUnitProperty(iu, INCLUSION_RULES_KEY, "STRICT");
logger.log(ILog.INFO, "IU: " + iu.toString() + ", \"" + INCLUSION_RULES_KEY + "\"=\""+ pf.getInstallableUnitProperty(iu, INCLUSION_RULES_KEY)+"\"");
}
...
How you've managed to modify these properties ("org.eclipse.equinox.p2.internal.inclusion.rules") on the IProfile instance used later by UpdateOperation.computeProfileChangeRequest ? Is that the way you have taken?.
Thanks in advance
Bernardo
P.S.
I've tried also to write our own version of UpdateOperation (within the same package org.eclipse.equinox.internal.p2.operations) without success, an IllegalAccessException is thrown when accessing superclass (ProfileChangeOperation).
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03353 seconds