|Triggering an Uninstallation of a Feature While Installing Another Feature via Touchpoint Actions [message #1160888]
||Tue, 29 October 2013 12:24
| Johnny Mongiat
Registered: December 2009
Is it possible to uninstall a specified feature while installing/upgrading another feature (all done as a single step)?
For example, suppose an RCP application currently has feature com.foo.feature installed. Now a user wants to upgrade the RCP application, so they add a software site (i.e. the RCP application includes provisioning support via the UI) which points a p2 repository that contains the newer versions of existing features, say com.bar.feature, but not com.foo.feature (this is no longer applicable i.e. deprecated), and goes through the standard "Check for Updates". Is it possible to trigger the uninstallation of com.foo.feature during the update process?
I took a look at the p2 touchpoint actions documentation (http://help.eclipse.org/kepler/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_actions_touchpoints.html), and noticed the org.eclipse.equinox.p2.touchpoint.eclipse.uninstallFeature action, but I'm not entirely clear on it's usage. I tried the following:
- p2.inf has the following instructions.uninstall=org.eclipse.equinox.p2.touchpoint.eclipse.uninstallFeature(feature:com.foo.feature.feature.group,featureId:com.foo.feature,featureVersion:1.0.0);
But I'm not sure if this is correct - I'm thinking this may get triggered during the uninstallation of com.bar.feature itself (I want to trigger the uninstallation of com.foo.feature during an upgrade of com.bar.feature). Perhaps I need to "bind" to another phase other than uninstall?
Logically, I would want the following to occur during the "Upgrade" process:
1. Uninstall com.foo.feature
2. Install/upgrade com.bar.feature (and other features...)
Note, I know the user can manually perform the above steps via the p2 UI infrastructure itself:
1. Help > About
2. Click on the "Installation Details" button.
3. Under the "Installed Software" tab, select the com.foo.feature feature node.
4. Click on the "Uninstall..." button.
5. Follow the uninstall directions to complete the uninstallation, and make sure to restart the RCP application when complete.
6. After restart, select Help > Install New Software...
7. Add the p2 upgrade repository (as an Available Software Site)
8. Close the Install wizard.
9. Help > Check for Updates
10. Review/Accept the selected features that will be updated, and complete the update process by following the directions provided by the wizard.
11. After another restart, you should be good to go!
This is an acceptable process, but I'm really curious if the process can be condensed as previously described.
Powered by FUDForum
. Page generated in 0.02397 seconds