Skip to main content

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


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
111122-0424-62Bh9JXThteMThaKvT55BLhaBpx2,2.2.0.v20111122-0424-62Bh9JXThteMThaKvT55BLhaBpx2]'
 optional='true'/>

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

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



Back to the top