Hi Pascal - One more question. Since I am running a server side application, the execution environment is setup as the standard Equinox OSGI frameworkand not as an Eclipse runtime. I believe this is why the bundles.info does not get updated. My update site has "features" defined (since I cannot define a product for an OSGI runtime environment) and I can install these features and the plugins are downloaded and the profile is updated as I would expect. However, the bundles.info is never updated. After looking at the p2 code it looks like this is only triggered if you are running as an eclipse product and it will never get triggered if you are running in a standard OSGI environment. Is this expected? Chase
On Thu, May 14, 2009 at 9:29 PM, Pascal Rapicault < [email protected]> wrote: > 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. > > > [image: Inactive hide details for Chase Wolfinger ---05/14/2009 11:07:47 > PM---Hi Pascal - I am currently running with the following VM]Chase > Wolfinger ---05/14/2009 11:07:47 PM---Hi Pascal - I am currently running > with the following VM arguments: -Declipse.p2.data.area=C:\p2agent\p2 > -Declipse.p2.profile > > > 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]* <[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*<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 > > [image: Inactive hide details for Chase Wolfinger ---05/14/2009 > 09:52:01 PM---Hello - I am trying to use profiles with a standalone > osg]Chase > Wolfinger ---05/14/2009 09:52:01 PM---Hello - I am trying to use profiles > with a standalone osgi > > > > From: > Chase Wolfinger <*[email protected]* <[email protected]>> > To: > "*[email protected]* <[email protected]>" <* > [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]* <[email protected]>* > > **https://dev.eclipse.org/mailman/listinfo/equinox-dev*<https://dev.eclipse.org/mailman/listinfo/equinox-dev> > > > > _______________________________________________ > equinox-dev mailing list* > **[email protected]* <[email protected]>* > > **https://dev.eclipse.org/mailman/listinfo/equinox-dev*<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 > >
_______________________________________________ equinox-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/equinox-dev
