Hi,

Eventually I found out that this problem was not caused by p2 in any way.

I have attached a debugger to the machine showing this problem and found out 
that the extension point declaring the custom action was not being retrieved in 
ActionManager.getActionMap().
>From there, I determined that a JVM conflict was preventing the action plugin 
>from being started - leaving it in the "installed" state as Eclipse was being 
>mistakenly run on a 1.5 JVM while the plugin requires 1.6.

Note that I got no visible error about the failing constraint, the only hint 
was that the plugin was listed in the Eclipse configuration, but not in the 
available plugins list. Starting Eclipse using -console and trying to start the 
bundle manually displayed the actual error.

Hope this can help someone struggling with a similar problem!

Kind regards,

/Mario Pierro


From: Mario Pierro
Sent: den 15 november 2011 14:42
To: '[email protected]'
Subject: Inconsistent custom action behavior

Hello,

I am trying to execute a custom action during installation of a feature in the 
Eclipse CDT distribution. While this works correctly in most cases, I am 
finding that on some machines the installation results in the following error:

"An error occurred while configuring the installed items session context 
was:(profile=epp.package.cpp, 
phase=org.eclipse.equinox.internal.p2.engine.phases.Configure,
operand=null --> [R]com.iar.cdt.arm.debugger.feature.feature.group
0.12.0.v201111101709,
action=org.eclipse.equinox.internal.p2.engine.MissingAction).
No action found for: com.iar.installer.arm.resetDsfStepDelay.
No action found for: com.iar.installer.arm.resetDsfStepDelay."

The action is declared in the following p2.inf file

provides.0.namespace=org.eclipse.equinox.p2.engine.actions
provides.0.name=com.iar.installer.arm.resetDsfStepDelay
provides.0.version=1.1

and the plugin containing the action itself (com.iar.installer.arm) declares it 
like this

   <extension
         point="org.eclipse.equinox.p2.engine.actions">
      <action
            class="com.iar.installer.arm.actions.ResetDsfPreferencesAction"
            name="resetDsfStepDelay"
            touchpointType="com.iar.hubble.releng.touchpoint"
            touchpointVersion="1.0"
            version="1.1">
      </action>
   </extension>
   <extension
         point="org.eclipse.equinox.p2.engine.touchpoints">
      <touchpoint
            class="com.iar.installer.arm.touchpoints.ResetPreferencesTouchpoint"
            type="com.iar.hubble.releng.touchpoint"
            version="1.0">
      </touchpoint>
   </extension>

The p2.inf file for the feature requiring the action is

metaRequirements.0.namespace=org.eclipse.equinox.p2.engine.actions
metaRequirements.0.name=com.iar.installer.arm.resetDsfStepDelay
metaRequirements.0.range=1.1
instructions.configure=com.iar.installer.arm.resetDsfStepDelay();

As I mentioned, this works correctly in most cases, but on some machines it 
fails with the reported error. As the plugins are unsigned, I can see the p2 
dialog asking for unsigned install twice: first for the plugin containing the 
action and its dependencies, and then for the feature requiring the action.
After the error has appeared, the plugin containing the action and its 
dependencies are installed, while the feature using the action has not.

As this is the first time I am using custom p2 actions, I am unsure whether I 
am doing things in the correct way. There seems to be no specific system 
configuration which is associated to the failure.

Thanks for your help!

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

Reply via email to