Recently, I’ve thought that I’ve understood how the update mechanism of an RCP application works. I don’t. Though the articles from Lars Vogel and Ralf Ebert about updating RCP applications were a great help, something went completely wrong with OpenChrom. And I definitively had no clue where to start searching. Everything worked fine updating additional installed plug-ins, but the base RCP couldn’t be updated. Each time the update mechanism told me, that no updates are available.
Anyhow, the update sites are accessible in the same way it works for the plug-ins. No success. Then I exported the product and uploaded the created metadata repository on my server. After adding the update site “http://www.openchrom.net/main/repositories/0.6.x/repository” to the list of “Available Software Sites” and running the update again, I’ve got the following error message.
Aha, the first hint “Only one of the following can be installed at once“. It brought me to the Bug 322344 which led me to the assumption, that it has something to do with the “Multi-user install” settings. Hence, I had a look at the Eclipse runtime options and the settings used in OpenChrom’s options file “openchrom.ini”.
... -Dosgi.install.area.readOnly -Dosgi.firstname.lastname@example.org/.openchrom/0.6.0/OpenChrom/configuration -Dosgi.email@example.com/OpenChrom/workspace ...
I’ve used a distinct configuration area to allow installations of user-specific plug-ins, see Eclipse multi-user installs. It works fine for such a purpose but not for updating the base RCP. Time to tinker with these settings. Finally, I’ve found a setting that works under Windows, Linux and MAC OS X.
... -Dosgi.install.area.readOnly -Dosgi.firstname.lastname@example.org/OpenChrom/workspace -Dosgi.email@example.com/.openchrom/0.6.0/Settings ...
It works so far and I’ve learned to not use “osgi.configuration.cascaded=true” if the base RCP application shall be updatable. But honestly, I’d really like to fully understand how multi-user install configurations and the p2 update mechanism are working. Is there maybe someone, who has a good tutorial or white-paper?