|Re: [p2-dev] Install features & bundles to separate location than RCP product|
When p2 is running in a shared install mode (which happens when eclipse is installed in a read-only folder), the user can not cause an update of the base (what is read only), so could you explain what it is you are trying to achieve?
From: Chip Downs <chipperdowns@xxxxxxx>
Subject: Re: [p2-dev] Install features & bundles to separate location than RCP product
Date: 15 April, 2013 10:59:44 AM EDT
Reply-To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
After experimentation using the director, I need to rephrase my question: What is the equivalent way, if any, of specifying the -destination and -shared values through the programmatic API (for an InstallationOperation) that would otherwise be specified through a command-line execution of org.eclipse.equinox.p2.director?
I have an RCP product that installs and uninstalls features/bundles just fine when running from a traditional, Eclipse-like installation. Using logic similar to the following article, it headlessly performs updates from a repo site, modifies the product's "p2", "features", and "plugins" directories accordingly, and starts the installed bundles (as applicable):
The problem is that the product also needs to perform the provisioning operations from a read-only installation on a shared network folder. For many of its users, the installed product doesn't have the luxury of writing to its "p2", "features", and "plugins" directories.
Handling the p2 directory seems easy enough. All I need is a script that copies the p2 directory from the read-only installation to a writable local path and specifies the new location via eclipse.p2.data.area property.
The other directories are a different issue, however. Install operations fail because they're trying to write to the read-only installation's features and plugins directories. I can't seem to find another configuration property to specify an alternate location for the installed features and plugins. Although a number of articles and blogs entries about shared locations and bundle pooling seemed promising, they appeared to deal with the command-line director application.
Again, my product's installations are performed programmically via InstallOperations and ProvisioningJobs in conjunction with the simple configurator. I'd think that there were some simple configuration property to point them at an alternate installation path. I certainly hope that it doesn't require Java code changes and/or a different product build.
P.S. This problem appears to be similar to the one described here: http://stackoverflow.com/questions/11666907/p2-self-provisioning-rcp-vs-windows-uac