| Summary: | [doc] Touchpoint actions marked greedy are not loaded during collect phase | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Juergen Kindler <jkindler> | ||||||
| Component: | p2 | Assignee: | Simon Kaegi <simon_kaegi> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | irbull, pascal, simon_kaegi, susan | ||||||
| Version: | 3.6 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 316724 | ||||||||
| Attachments: |
|
||||||||
Are you using a greedy "metarequirement" for the custom actions? e.g. see http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata Custom action providers need to be installed before the IUs that use the actions. A metarequirement places a requirement on the "installer" so that we get a two stage install where the custome action provider is installed before the custom action using IU(s). (In reply to comment #1) Yes, indeed. We use that. test.tutorial specifies: metaRequirements.0.namespace=org.eclipse.equinox.p2.touchpoint.tutorial metaRequirements.0.name=harvestHasi metaRequirements.0.range=1.0.0 metaRequirements.0.greedy=true and org.eclipse.equinox.p2.touchpoint.tutorial: provides.0.namespace=org.eclipse.equinox.p2.touchpoint.tutorial provides.0.name=harvestHasi provides.0.version=1.0.0 So the experience was that first org.eclipse.equinox.p2.touchpoint.tutorial was installed and then during installation of test.tutorial the actions registered by org.eclipse.equinox.p2.touchpoint.tutorial could be used. Created attachment 171846 [details]
updated p2.inf
Here's an updated p2.inf that moves you action work to the install phase instead of the collect phase.
The problem was that the custom action was trying to run during the collect phase and is not installed at that point. This is caused because we "pre-download" all the artifacts using the "collect" phase before actually performing the real install.
We need to "formally" sort this use-case out more fully by either not permitting the use of custom actions in the collect phase or else in the p2 UI running the installer plan fully before doing the "pre-download" work.
For now the best workaround is to not use custom actions in the "collect" phase and to be honest I think this is the best long term approach also.
(In reply to comment #3) Thanks a lot for the info and the updated p2.inf. Unfortunately, it leads to the same problem as the original - just in a different phase: An error occurred while installing the items session context was:(profile=SelfHostingProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]test.tutorial 1.0.0.201006160750, action=org.eclipse.equinox.internal.p2.engine.MissingAction). No action found for: org.eclipse.swordfish.p2.touchpoint.tutorial.harvest. No action found for: org.eclipse.swordfish.p2.touchpoint.tutorial.harvest. So it seems that even during the install phase it is not possible to do this kind of thing anymore. :-( Strange. I just re-tested with a clean RC4 install and everything worked correctly. I'll re-diff against your original projects as maybe I missed something. (In reply to comment #5) No, it could have been my run configuration (I started the Eclipse in a debug config and even though everything gets cleared upfront, maybe something was not as clean as expected.) :-( I reinstalled Eclipse and it worked correctly (namely after I changed HarvestAction.EXECUTE_IN_PHASE = "install"; I saw the expected dialog popping up! :-) ) (((((-: Thank you very,very,very much Simon :-))))) That's good that you're working now. I still want to leave this bug open as I think we need to document a little caution when using custom actions during the collect phase. No more work planned there. |
Created attachment 171374 [details] Sample projects ... I've got the problem that I want to enhance the installation of plugin test.tutorial with custom actions (org.eclipse.equinox.p2.touchpoint.tutorial) that should be downloadable. So I marked plugin test.tutorial to greedily require org.eclipse.equinox.p2.touchpoint.tutorial. I build this working sample around the time when M6 was out, got it running with M6 and planned to do the actual work later (as this would not be bound to the release cycle). Now, with RC4 it does not work anymore: java.lang.IllegalArgumentException: No action found for: org.eclipse.swordfish.p2.touchpoint.tutorial.harvest. at org.eclipse.equinox.internal.p2.engine.MissingAction.execute(MissingAction.java:42) at org.eclipse.equinox.internal.p2.engine.Phase.mainPerform(Phase.java:149) at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:78) at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:44) at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:73) at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:44) at org.eclipse.equinox.p2.operations.ProvisioningSession.performProvisioningPlan(ProvisioningSession.java:151) at org.eclipse.equinox.p2.operations.ProfileModificationJob.runModal(ProfileModificationJob.java:79) at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:177) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Tracking back, I found that already in M7 it's broken. Unfortunately this is essential for my implementation. :-( Is there anything I can do to make it work again?