| Summary: | [update] Error installing examples with p2-provisioned SDK | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | John Arthorne <john.arthorne> | ||||||||||
| Component: | UI | Assignee: | Chris Aniszczyk <caniszczyk> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | curtis.windatt.public, daniel_megert, darin.eclipse, dj.houghton, overholt, pascal | ||||||||||
| Version: | 3.4 | ||||||||||||
| Target Milestone: | 3.6 M7 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows XP | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
John Arthorne
I'm a bit surprised since I have not seen any dependency update from these plugins. The code is in org.eclipse.pde.internal.ui.samples.ShowSampleAction#downloadFeature(). It uses update.core command API. Doh, I had ignored PDE dependencies on update thinking they were only related to the management of targets. Given that the SDK will ship with both p2 and update manager, this is not an issue. We just need to make sure that everything works properly. If we want the SDK to be able to run with only p2, we may need some small facade API that delegates to either p2 or UM depending on which one is available. As discussed during today's meeting, supporting a p2 only mode for the SDK is not on the plan for 3.4. (In reply to comment #6) > As discussed during today's meeting, supporting a p2 only mode for the SDK is > not on the plan for 3.4. Can we mark Invalid? Need to revise as part of the effort to get rid of UM. Created attachment 126210 [details]
log file
Attached is the log file from installing the tools in build I20090217-2200. (note classic Update Manager is available)
What is happening is that the PDE/UI Sample Action code is installing the sample bundles via the old Update Manager APIs. This is going out and downloading the bundle/feature, putting them in the plugins/ and features/ directories, updating the platform.xml file, and basically performing a dynamic install. It calls the operation code which in turn calls code on the update.configurator activator to perform a reconciliation when the download is complete. Then the PDE code calls "apply changes now" and things continue after the new code has been installed. The JARs are downloaded and put in the plugins and features directories and execution is allowed to continue and the samples seem to work ok. But there are a couple of problems with this scenario if p2 is being used to manage the system. The main problem here is that since p2 wasn't used to install the samples, the bundles.info and profile files aren't updated with the new installation information. On the next restart, the p2 reconciler should discover the new JARs and try to install them into the running system (which may or may not work depending on if all dependency requirements are met). If execution is allowed to continue before p2 can officially install the samples, then this can lead to confusing circumstances for the user. Basically any p2 operations that happen from this point forward will not take the samples into consideration. Thus if the user tries to install Feature Foo which depends on the samples, then p2 will not allow this although the user will think "hey, I just installed the samples so it should be there!". Pascal and I talked about this and decided that we won't be making any changes on the update manager/p2 side of things. The client is calling the Update Manager APIs and should be changed to call p2 APIs. Clearing milestone. We don't feel this is a necessity for 3.5. *** Bug 278958 has been marked as a duplicate of this bug. *** Created attachment 163589 [details]
Draft fix
I am interested in fixing this, since it is the only surviving reference to legacy Update Manager in the Eclipse SDK. With this fixed we should be able to run the SDK entirely without Update Manager (leaving only update.configurator).
Created attachment 163590 [details]
Draft fix v2
Created attachment 163666 [details]
Fix v3
This patch is ready for review. It does three things:
1) Changes ShowSampleAction to use p2 API to install the sample feature, rather than Update Manager API. Note that if you run this in a test workbench it will download the samples, but applying the configuration does not work. This is an artifact of self hosting - I exported this patch into a nightly build and the samples were installed and configured correctly.
2) ShowDescriptionAction was using a utility method from update core in order to create a temp working directory. I have just copied this convenience method into PDE to avoid referencing update (Utilities class copied from update and trimmed down).
3) Remove org.eclipse.update.core from the manifest imports (yay!)
Thanks John, made some minor changes.
> 20100401
*** Bug 279813 has been marked as a duplicate of this bug. *** |