|
Re: Do not install optional p2 dependencies of requirements [message #1824413 is a reply to message #1824366] |
Wed, 15 April 2020 04:22 |
|
Let me first explain what "optional" and "greedy" means.
An installable unit X declares an optional requirement on a capability Y if X provides extra functionality that becomes active if (and only if) some other installed unit Z provides the capability Y. The important point is that X can still be installed even if no other installed unit provides capability Y.
By default an optional requirement is non-greedy, which means that an installation of X does not automatically "pull in" any Z just because it provides a Y. If (at the same time or later) another installable unit Z1 is installed that provides Y the extra functionality of X becomes automatically active. If an optional requirement of X is declared to be greedy the installation of X will try to pull in a Z that provides Y, i.e., it will try to not leave the installation of Z to other IUs.
In fact org.eclipse.egit.ui declares the following
<required namespace='osgi.bundle' name='org.eclipse.jdt.core' range='[3.12.0,4.0.0)' optional='true' greedy='false'/>
<required namespace='osgi.bundle' name='org.eclipse.jdt.ui' range='[3.12.0,4.0.0)' optional='true' greedy='false'/>
Both requirements are non-greedy. That means, if org.eclipse.jdt.(core|ui) get installed, then not because of the requirement of org.eclipse.egit.ui but because of the non-optional or optional-greedy requirement of a third IU.
You have to find out what this third IU is and through what requirements it is pulled in from your root requirements. There's nothing in Oomph (or p2 for that matter) that let's you modify the requirement declarations of arbitrary IUs. If all "offending" requirements are optional-greedy, i.e., not non-optional, you may have a chance to specify a "negative" root requirement on org.eclipse.jdt. Newest Oomph versions allow to declare the cardinality of a requirement in terms of min/max. If you set max to zero the requirement becomes negative. To see the min/max attributes in the Properties view you must enable the "Show Advanced Properties" button.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03711 seconds