[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] What is the meaning of an optional feature?

Bug [1] was certainly released into master and has commit hashes:

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=247099


However, this fix only appears to affect the 'bundles Action'. That is, only IUs that were created for bundles (plug-ins, whatever you want to call them) were affected by this patch.  In the case that you're looking at, it appears that "features" are not being properly handled. 

David, can you confirm that the feature.groups are the ones missing missing the greedy == false?


On Mon, Feb 13, 2012 at 9:21 PM, David M Williams <david_williams@xxxxxxxxxx> wrote:

I'm sure readers of this list recall all the discussion last year about how
bundles that are optional at runtime, should not be installed greedily, but
instead allow it to be more of of a user/adopter choice, since it is, after
all, optional. [1] [2]

And, after some discussion [1], it was decided to change how the publishers
work, rather change core behavior of p2. So, by default optional=true would
also publish greedy=false.

Fine and well, and I was sitting around just leisurely reading through some
M5 content.xml files :) and noticed that for all "optional
groups" (*feature.group) the IU requires statement (still) says only
optional=true and never says greedy=false. So, I'm wondering ... a) is this
a coincidence about a point in time, and those that have optional features
haven't used new publisher? or b) intentional behavior to maintain some
historical meaning of the concept of "optional feature"?, or c) a possible
bug in the p2 publisher .... and all optional IU's should be treated the
same?  It seems that bug 354581 discusses a similar issue, but not so much
from the "publisher" point of view, but from the workings of p2, I think.
I'm leaning towards thinking it is a bug in the publisher, but seemed a
large and complicated enough issue to raise on this list first, in case its
clear to the core team why its done the way it is. I seem to recall
"optional features" in the old update manager was still something users had
to pick explicitly to get installed?

So, thought I'd raise this issue on this list to see if we can get some
quick resolution in time for Juno? And, seems like the first step in that
would be to know what "optional feature" is supposed to mean.
Some of the ones I saw were source features (which seems like should be
greedy=false, to me), but not all. For example,

<unit id='org.eclipse.platform.feature.group' ...

requires p2.user.ui.feature optionally

       <required namespace='org.eclipse.equinox.p2.iu'
name='org.eclipse.equinox.p2.user.ui.feature.group' range='[2.2.0.v20

(Admittedly, this one might be optional=true greedy=true (implied) on

Advice welcome,  I'd be happy to investigate deeper, if the publisher
should be specifying greedy=false by default, but thought I'd ask here
first about what it is supposed to mean.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=247099
[2] http://wiki.eclipse.org/Equinox/p2/Publisher#BundlesAction
[3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=354581

p2-dev mailing list

R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource