[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] p2 : make feature A updateable over feature B

Hello p2 gods,

we're about to release m2e-wtp from Eclipse.org and, in order to minimize user disruption, would like to make the m2e-wtp feature upgradeable over it's ancestor (m2eclipse-wtp, from github).ÂSo basically our requirements are :
1 - m2e-wtp and m2eclipse-wtp can not be installed together
2 -Âm2e-wtpÂshould be able to upgrade itself ANDÂ m2eclipse-wtp

Pascal kindly helped me setup (and understand) #1 using some p2.inf configuration (http://git.eclipse.org/c/m2e-wtp/org.eclipse.m2e.wtp.git/tree/org.eclipse.m2e.wtp.feature/p2.inf), similar to what's done for m2e actually.

Now #2 is where we're hitting a wall. I tried Pascal's suggestion to modify the content.xml from the update site's content.jar by doing the following :Â

1 - add "providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.maven.ide.wtp.feature.feature.group' || pc.name == 'org.eclipse.m2e.wtp.feature.feature.group' && pc.version < '${version}'))" to feature.update.match
2 - remove the id and range attributes fromÂfeature.update

This is all scripted inÂhttp://git.eclipse.org/c/m2e-wtp/org.eclipse.m2e.wtp.git/tree/org.eclipse.m2e.wtp.site/src/main/assembly/fixupdate.groovy

The whole script works as expected (the content.xml is properly tweaked, after the site is generated by tycho) but the problem is, the hack doesn't work : m2e-wtp 0.16.0 is still not upgradeable over m2eclipse-wtp 0.15.2 and complains about the conflict declared in p2.inf

The whole issue is tracked asÂhttps://bugs.eclipse.org/bugs/show_bug.cgi?id=385746

Any help/ideas are more than welcome.


Fred Bricon

"Have you tried turning it off and on again" - The IT Crowd