开发者

In Equinox is it possible to for one feature/bundle to obsolete another?

开发者 https://www.devze.com 2023-01-04 08:55 出处:网络
I have a Eclipse-based project (the Scala IDE for Eclipse) which has recently moved to a new home. I want to change the various feature ids, Bundle-SymbolicNames etc. to reflect the move (ie. so that

I have a Eclipse-based project (the Scala IDE for Eclipse) which has recently moved to a new home. I want to change the various feature ids, Bundle-SymbolicNames etc. to reflect the move (ie. so that they all have an org.scala-ide prefix) and restart the version numbering (previously it was tied to the corresponding Scala compiler release and I want to decouple these).

But I want p2 to recognize that, eg. org.scala-ide.sdt.feature v. 1.0.0 is an upgrade开发者_JAVA技巧 of ch.epfl.lamp.sdt v. 2.7.7. With RPM it would be possible to do this using an obsoletes directive ... is there an equivalent for p2?


I believe this is possible, but there is currently no tooling (or documentation) for it.

Each IU contains an Update Descriptor (javadoc) which indicates which IU it is an update of. The existing tooling always sets this to be previous versions of the same bundle. In the content.xml it looks like this:

<unit id='org.eclipse.equinox.launcher' version='1.1.0.v20100507'>
   <update id='org.eclipse.equinox.launcher' range='[0.0.0,1.1.0.v20100507)' severity='0'/>
   ...

To set this you could

  1. Wait for bug 282545 to get fixed.
  2. Edit the content.xml manually (perhaps an xslt transform)
  3. Extend the p2 publisher to generate a different descriptor. You would want to override BundlesAction to use your own version of BundlesAction#createBundleIU.
0

精彩评论

暂无评论...
验证码 换一张
取 消