[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Fragment oddities

Ian, Pascal,
Thanks for the clarification. I understand how it works now and why you decided to call it fragments. I guess that if really I want to query for all OSGi fragments, I can safely do so by looking for IU's that has a provided capability in the 'osgi.fragment' that appoints the host.

Regards,
Thomas Hallgren


On 09/24/2009 02:49 AM, Pascal Rapicault wrote:
As Ian mention this is not an odity, this is by design. I just want to add
some more details to Ian's answer.
The relationship between a bundle and a bundle fragment does not need to be
modelled in a special way from a provisioning standpoint, it is just a
dependency.
You have to remember that p2 is to provision everything and nothign in
particular, exposing the concept of osgi fragment as a special entity in
the metadata would fail this attempt of being generic.
IUFragments are mostly used to deliver configuration information such as
startlevels, vm args, etc which can not be placed in the IU they are
attaching to since it would make the IU not reusable (e.g. the start level
of the extension registry depends on the environment in which it is
deployed).

PaScaL



                                                                                                                        
  From:       Ian Bull <irbull@xxxxxxxxxxxxxxxxx>                                                                       
                                                                                                                        
  To:         P2 developer discussions <p2-dev@xxxxxxxxxxx>                                                             
                                                                                                                        
  Date:       09/23/2009 06:21 PM                                                                                       
                                                                                                                        
  Subject:    Re: [p2-dev] Fragment oddities                                                                            
                                                                                                                        





>From what I understand (this was explained to me a while back), fragments
in the sense of OSGi and Fragments in the sense of p2 are two completely
different things.  The p2 metadata doesn't represent OSGi fragments as
InstallableUnitFragments, these are represented as normal InstallableUnits.

IUFragments are used to declare fragments on the IU (translation properties
on the IU for example).

I'm not sure if that made sense. ;)

cheers,
ian

On Wed, Sep 23, 2009 at 3:10 PM, Thomas Hallgren <thomas@xxxxxxx> wrote:
  I'm looking at an IU that I was fairly sure was a fragment. The IU in
  question is the 'org.eclipse.swt.win32.win32.x86'.

  When I read this IU using a query, it doesn't arrive as a
  IInstallableUnitFragment and when I look at it's XML in the content.jar,
  it doesn't have any hostRequirements. It's also missing the fragment
  signum:

  <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>

  So I guess this isn't a fragment then, at least not from a P2
  perspective? OSGi will see it as a fragment. The manifest contains:

   Fragment-Host: org.eclipse.swt;

  and this entry can also be found. Not sure what it means, but perhaps
  it's some ancient way of declaring the host requirement?

  <provided namespace='osgi.fragment' name='org.eclipse.swt'
  version='3.5.0.v3550b'/>

  Can someone please explain why the IU is declared this way?

  Thanks,
  Thomas Hallgren

  _______________________________________________
  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
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


  

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