[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Loading different P2 Profiles during runtime

Hi Dileepa,

I am not an Eclipse dev, but hopefully this will help you to better understand the difference between p2 and OSGi.

I like to think of p2 as a component repository and a tool to configure which bundles will be available in OSGi runtime once Eclipse is started. On the other hand, as soon as Eclipse is launched, it is straightforward to install and uninstall various OSGi bundles dynamically. Thus, if you want to dynamically load and unload feature groups at runtime, it is probably better to use OSGi API, whereas if you want to have several related Eclipse-based applications created on demand, it is probably better to use p2 API. Under "feature groups" I really meant a "not too heavy" set of features with non-conflicting requirements which can be swapped at runtime, and under "related applications" I meant a bigger set of features with potentially conflicting requirements which can only be swapped after a restart.

Regards,
Mikhail


From: "Ian Bull" <irbull@xxxxxxxxxxxxxxxxx>
To: "P2 developer discussions" <p2-dev@xxxxxxxxxxx>
Sent: Friday, January 18, 2013 7:54:06 PM
Subject: Re: [p2-dev] Loading different P2 Profiles during runtime

Targets have a special meaning in Eclipse, and they are "development time" artifacts. In particular, that bug you pointed to (bug 287619) is about using p2 profiles at development time, so I'm that will not help you with the runtime aspects. If what your trying to do is "pool" several different applications together (so they share a common set of bundles), and allow the user to choose which which application to start, I would structure this a multiple p2 profiles. You likely need to create your own "configurator" to start that application, but it should be possible.

cheers,
ian


On Fri, Jan 18, 2013 at 10:48 AM, Pascal Rapicault <pascal.rapicault@xxxxxxxxxxxx> wrote:

Hi Dileepa,

 

From reading your note, I have the impression that you have your own notion of profile that is different than the one from p2.

As I said, the notion of profile used in p2 does not represent something to install, but the installed state.

 

In your case, what I think you want to do is identify the set of features that constitute a profile and group them into one feature that you can easily identify for installation (and to present it to the user ?). Then when the user select such a feature, you uninstall any previously installed feature and install this feature in the runtime, and then you install the âtarget productâ.

 

HTH

 

Pascal

 

From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Dileepa Jayakody
Sent: January-17-13 3:29 PM
To: p2-dev@xxxxxxxxxxx
Subject: Re: [p2-dev] Loading different P2 Profiles during runtime

 

Hi Pascal et al,

Sorry if I was unclear in my previous mail.
Our requirement is to dynamically select the P2-Profile to load the target product.
In different Profiles we have  different sets of features installed and in runtime we need to give the user with an option of selecting the Profile to load the application.
I think this is somewhat similar to reverting a profile to a earlier state?  What we need is to switch between profiles during runtime and load different target products.
I hope I made our intentions clear this time :)
I found this [1] in Eclipse BugZilla which I think is somewhat inline with what we are trying to achieve.
Appreciate any pointers on this.

Thanks,
Dileepa

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=287619


_______________________________________________
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