[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] installing features via p2 api

We are still working on resolving the issue - I think it is being caused by the org.eclipse.equinox.simpleconfigurator.manipulator issue not being in our agent, which itself appears to be tied to the fact that we are running our provisioning agent as a run profile in eclipse rather than deploying a feature to a container, which is in turn caused by the fact that we are ecplise and osgi n00bs in addition to knowing very little about p2.

On another note, we are confused about how profiles interact with installations.  Is there any chance that the fact that we are installing into a "custom" profile is what is preventing us from seeing the bundle/feature in the console?  We can see the feature installed on the file system under the profile data location, and querying p2 for the bundle also shows that bundle as "installed", but doing an ss/services/apps/etc from the console shell does not show the bundle at all.  In fact, we see similar behaviour when installing via provinstall, although, again, that may be due to misconfiguration as well.


On Dec 4, 2010, at 6:49 PM, Pascal Rapicault wrote:

Forgot to mention, you may be interested in taking a look at the equinox.p2.operations API (http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/equinox/p2/operations/package-summary.html
It encapsulates behind a few lines of code the same thing than you have in your code.

On 2010-12-04, at 4:44 PM, Pascal Rapicault wrote:

This code looks correct. I can think of several problems:
A) Be sure that there is an IU fragment associated with all the IUs representing the bundles. This IU fragment also referred to as "configuration unit" is supposed to say that the bundles needs to be installed and at which start level. You can see if an IUFragment is attached on an IU by introspecting the plan. For example in the eclipse SDK we ship a CU called tooling.osgi.bundle.default that configures all bundles to be installed and started at start level 4, and then individual CUs that configure bundles with specific values (e.g. toolingcocoa.macosx.x86_64org.eclipse.equinox.simpleconfigurator).

B) Misconfiguration
1) the agent running the provisioning operation does not contain org.eclipse.equinox.simpleconfigurator.manipulator and therefore the bundles.info file does not get written.
2) the system being provisioned does not contain org.eclipse.equinox.simpleconfigurator, therefore the creation of the bundles.info is not done.

In both cases, the values would end up being written in the config.ini, but since there is no Configurator service registered for the config.ini (the only Configurator service being registered is done for SimpleConfigurator) then the call is a noop.

C) If this does not help then you will have to resort to see what happens when the EquinoxManipulator persists the changes (EquinoxManipulatorImpl.save(boolean))


On 2010-12-04, at 1:21 AM, Kevin McIntire wrote:


We are looking at using P2 as part of a continuous deployment infrastructure to support a high volume distributed service and wanted to see if we could get a little assistance in bringing up a prototype using p2 as a provisioning agent in headless containers.  Specifically, we've looked at the p2 source code and at the toast example, and are having an issue where we install a feature via (roughly)

       IProfileChangeRequest request = planner.createChangeRequest(profile);
       ProvisioningContext context = new ProvisioningContext(agent);
       IProvisioningPlan plan = planner.getProvisioningPlan(request, context,
       engine.perform(plan, monitor);

The condition we observe is that the operation above succeeds, and we can query the IU out of the profile, but cannot see it (via ss) on the equinox console (we are just deploying to a debug container from eclipse) and we cannot see the bundle in any other way from the console.  Does anyone know what we are missing to "commit" the install?

My apologies if this if off topic or on the incorrect list.


p2-dev mailing list

p2-dev mailing list