The result of the installation of an IU that contains a bundle should
result in the bundle to be listed in the bundles.info in the
configuration/org.eclipse.equinox.simpleconfigurator/bundles.info.
To cause the system to "re-consider" this list of bundles, you need to grab
the Configurator service (provided by the simpleconfigurator bundle) and
call applyConfiguration(). This is how the apply changes dialog is
implemented.



|------------>
| From:      |
|------------>
  
>-------------------------------------------------------------------------------------------------------------------------------------------|
  |Chase Wolfinger <[email protected]>                                  
                                                              |
  
>-------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>-------------------------------------------------------------------------------------------------------------------------------------------|
  |Equinox development mailing list <[email protected]>                   
                                                              |
  
>-------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc:        |
|------------>
  
>-------------------------------------------------------------------------------------------------------------------------------------------|
  |[email protected]                                              
                                                              |
  
>-------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>-------------------------------------------------------------------------------------------------------------------------------------------|
  |05/14/2009 11:07 PM                                                          
                                                              |
  
>-------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>-------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [equinox-dev] Question on Profiles / p2 and standalone Osgi              
                                                              |
  
>-------------------------------------------------------------------------------------------------------------------------------------------|





Hi Pascal - I am currently running with the following  VM arguments:

 -Declipse.p2.data.area=C:\p2agent\p2 -Declipse.p2.profile=ExampleProfile

I have written a simple debug plugin that pulls the current "SELF" IProfile
and it comes back ExampleProfile.  I have then pulled the IU(s) and they
all come back from the profile query.  So it seems like the p2 framework is
installed correctly.  Once this is done is there a best practices to
reconcile the currently running bundles with the profile IUs - similar to
an apply changes? or is it better to iterate through the IUs and install
the OSGI bundles directly ?



On Thu, May 14, 2009 at 8:28 PM, Pascal Rapicault <
[email protected]> wrote:
  Hi,

  The profile is not here to instruct p2 what should be installed in your
  system. Instead you need to think of it as the record of what has been
  installed.
  I think that the issue you are encountering is a tooling one where when
  you are starting an application from within Eclipse, no corresponding
  profile is created and as such any subsequent p2 operation can be
  problematic (https://bugs.eclipse.org/bugs/show_bug.cgi?id=250126).
  There is currently two work around:
  1) You create a profile for your installation using the admin ui. When
  you start your application from within the IDE you set the vm arg
  eclipse.p2.data.area to point at the p2 folder that contains the profile
  you are running (e.g.
  -Declipse.p2.data.area=/Users/Pascal/Downloads/eclipse/p2/). You may also
  want to specify the ID of your profile by setting eclipse.p2.profile as a
  vm arg (e.g. eclipse.p2.profile=PlatformProfile)
  2) You write a bundle that looks around in the running system, generates
  metadata representing it, and fake up an installation into a profile (you
  can find most of the code for generation in the publisher bundle). This
  bundle would be running in the application started. This is really a HACK
  and should not be used in real systems. I'm giving you this approach as a
  way for you to progress, but using this in a real product would result in
  not guaranteeing unicity of metadata, would not allow you to manage all
  the external files, and finally would have a cost on startup to update
  the system.

  HTH

  PaScaL

  Inactive hide details for Chase Wolfinger ---05/14/2009 09:52:01
  PM---Hello - I am trying to use profiles with a standalone osgChase
  Wolfinger ---05/14/2009 09:52:01 PM---Hello - I am trying to use profiles
  with a standalone osgi



                                                                       
                                                                       
 From:           Chase Wolfinger <?:[email protected]>         
                                                                       
                                                                       
 To:             "[email protected]" <[email protected]>  
                                                                       
                                                                       
 Date:           05/14/2009 09:52 PM                                   
                                                                       
                                                                       
 Subject:        [equinox-dev] Question on Profiles / p2 and standalone
                 Osgi                                                  
                                                                       





  Hello - I am trying to use profiles with a standalone osgi
  application. I have set the osgi app to use a specific p2 data area
  and with a profile I defined using the admin GUI. The profile
  references a shared bundle location. When I start the osgi application
  from eclipse it loads the p2 bundles i have defined in my target. I
  can determine that the app's profile is set to the one I defined and
  that the profile has the correct list of IUs. What I cannot figure out
  is how to get the p2 framework to reconcile what is currently
  installed at startup with what the profile says should be installed.
  Is it possible to get p2 to update the installed plugins based on a
  profile passed in at startup?

  Chase
  _______________________________________________
  equinox-dev mailing list.
  [email protected]
  https://dev.eclipse.org/mailman/listinfo/equinox-dev



  _______________________________________________
  equinox-dev mailing list
  [email protected]
  https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to