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


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

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

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

Reply via email to