Skip to main content

[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

5f0fb71330107d64a71b94c89443627bbc6dd159
21aef5cd787b0b0408b13fcfb0efa7cff0a46c5d

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?

Cheers,
Ian

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
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

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev



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

Back to the top