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

We were working in parallel :)

 I opened bug
to discuss this further, if needed, but the more I think about it, I'm not
sure what else an "optional feature" would mean, since there is not really
an OSGi runtime effect.

So, we can use the bug to have further discussion, if needed, but it may
not really be a bug, but "working as designed".

Appreciate the confirmation.


From:	Ian Bull <irbull@xxxxxxxxxxxxxxxxx>
To:	P2 developer discussions <p2-dev@xxxxxxxxxxx>,
Date:	02/14/2012 01:07 PM
Subject:	Re: [p2-dev] What is the meaning of an optional feature?
Sent by:	p2-dev-bounces@xxxxxxxxxxx

Actually, I just built a very simple test case (two features, an optional
dependency between them) and I published them both (actually I just
exported from the workbench).  I'm seeing what you saw David:

<required namespace='org.eclipse.equinox.p2.iu'
range='[,]' optional='true'/>


On Tue, Feb 14, 2012 at 9:34 AM, Ian Bull <irbull@xxxxxxxxxxxxxxxxx> wrote:
  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
   bundles that are optional at runtime, should not be installed greedily,
   instead allow it to be more of of a user/adopter choice, since it is,
   all, optional. [1] [2]

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

   Fine and well, and I was sitting around just leisurely reading through
   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
   a coincidence about a point in time, and those that have optional
   haven't used new publisher? or b) intentional behavior to maintain some
   historical meaning of the concept of "optional feature"?, or c) a
   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
   from the "publisher" point of view, but from the workings of p2, I
   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
   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
   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
   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

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