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))
> 
> HTH
> 
> On 2010-12-04, at 1:21 AM, Kevin McIntire wrote:
> 
>> Hi,
>> 
>> 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,
>>                 monitor);
>>        engine.perform(plan, monitor);
>>        this.configurator.applyConfiguration();
>> 
>> 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.
>> 
>> Thanks,
>> 
>> Kevin
>> _______________________________________________
>> p2-dev mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/p2-dev
> 

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

Reply via email to