If you’re, like me, one of the unlucky ones that aren’t on p2’s friends list (translation: Eclipse p2 provisioning causes you an endless stream of pain and suffering), then you can’t install the 3.4.1 patches because p2 won’t let you.
There are several ways to deal with this. One of them is to delete your workspace’s .metadata, your Eclipse install and start from scratch, installing all plug-ins again, etc., always hoping that p2 doesn’t mess up until you’ve installed everything.
The other way is a workaround. It needs a bit of disk space and discipline. Do this:
- Leave your original Eclipse install alone. Specifically, never ever use the menu “Software updates…” again! Never. I mean it. Disable the entry if you can.
- Install eclipse again in a new place. This must be a standard install (not a shared one!!!)
- Do not start this install! Specifically, do not attempt to add all your update sites to this base template! Just unpack it and rename the “eclipse” directory to “eclipse-template”.
- Copy “eclipse-template” to “eclipse-install”.
- Start eclipse-install. If you worry that you might accidentally start the template once in a while, rename “eclipse.exe” to “eclipse.exe Is this install”.
- Download the 3.4.1 updates.
- Exit eclipse-install.
- Use your favorite file copy tool to copy all new files and directories in eclipse-installplugins and eclipse-installfeatures to your working copy of eclipse.
- Start your working copy.
Installing and updating plug-ins works in a similar way:
- Delete eclipse-install and recreate it from eclipse-template.
- Start eclipse-install.
- Open the install software dialog. Add the update site. You may be tempted to add the update sites to eclipse-template. Don’t do this! As soon as p2 can see more than one update site, it will eventually mess up in the dependency calculation.
- Install the plug-in.
- Create a directory for your new plug-in in the driectory “dropins” of your working copy of Eclipse.
- Copy the new files and directories from eclipse-installfeatures and eclipse-installplugins to the new directory below “dopins” in your working copy of Eclipse.
- If you need to install more than one plug-in, start with step 1. After you have installed anything in eclipse-install, the Eclipse instance is tainted and shouldn’t be used again.
That’s all folks. At least until the p2 guys fix the many bugs in their code. Which will probably in the Eclipse release in 2010.
That’s not because I believe that the p2 guys are stupid or lazy but because this kind of product just takes three years to mature and they started in 2007, so the first working version can be expected in 20010.