Can't uninstall RCP feature patch [message #1697336] |
Wed, 03 June 2015 09:25 |
Philippe Craeye Messages: 2 Registered: June 2015 |
Junior Member |
|
|
Hello there
I created and installed a feature patch for Eclipse Indigo SR1 (Build id: 20110916-0149) and now would like to uninstall it but I simply can't (I also did some tests on Luna and had the same problem)
I hope someone can help me, maybe I will have a better understanding of the concepts behind P2....
Some questions about creating/installing feature patches can be found in tech forums. There are some tutorials around - usually, people may point to the Andrew Niefer page "patching-features-with-p2" - but I have not found too much information about problems occuring during uninstall.
Anyway, I want to uninstall my feature patch and come back to the previous version of the plugin/feature I patched ... the problem I have may be related to the way I create my patch (?) or maybe what I want to do is simply impossible.
Anyway here the short story:
- import the code of org.eclipse.ui.ide in my workspace and modify some code in it
- increment the plug-in version
- create a feature patch for the feature org.eclipse.platform and include the modified org.eclipse.ui.ide bundle
- export my patch into a tmp directory, checking the create metadata repository checkbox
- install this patch in Eclipse
- Everything's fine: the patch is installed and the change I made is visible in my IDE
- try to uninstall the patch via Help/About/Installation details => the uninstall fails with a dependency error, complaining about org.eclipse.platform being dependent upon ... the old version of org.eclipse.ui.ide
Below you'll find the details about how I create and publish my patch, in case I am doing something wrong or I am missing something.
I then try several combinations to uninstall it by hand: like remove the feature from the "features" directory of my eclipse installation, remove the new org.eclipse.ui.ide plugin jar and leave the "old" one, fix the artifacts.xml but I usually end up with a corrupted Eclipse installation.
So could someone please tell me if what I am trying to do is complete non-sense ? or what is the proper way to uninstall a feature patch ?
Many thanks for your help
Phil
====================
The long story:
- start a fresh install of eclipse-rcp-indigo-SR1-win32-x86_64 and open a fresh, empty workspace
- switch to perspective Plug-In development
- In the Plug-ins view, right click on org.eclipse.ui.ide / Import as source project
- Now the source code of the org.eclipse.ui.ide plugin is in my workspace: let's do a tiny change
- In the file plugin.properties at the root of this plugin, change "PreferencePages.Workbench = General" into "PreferencePages.Workbench = General Prefs" That corresponds to the first label found on the left hand side when doing Window/Preferences in Eclipse
- In the MANIFEST.MF, I do need to specify the plugin has changed so I change the version from 3.7.0.v20110809-1737 to 3.7.101.v20150528-1500
- I searched in all the features.xml located in my eclipse install to find out which feature this bundle is attached to: I found that's org.eclipse.platform Using mingw bash gui tool, I typed:
/usr/bin/find eclipse-rcp-indigo-SR1-win32-x86_64/features/ -name "feature.xml" -exec grep "org.eclipse.ui.ide" {} \; -print
There are apparently more clever ways to do that but anyway the result is that the feature that needs to be patched is apparently org.eclipse.platform
- I right click in Package Explorer and do a "New/Other/Plug-in Development/Feature Patch: Project Name: org.example.patch Properties of feature being patched: I browse and select org.eclipse.platform I leave all the other fields as they are and click Finish
- On the Plug-ins tab on the editor that just opened, I do "Add..." and type org.eclipse.ui.ide in the search field: it finds it and it is actually displaying the one that has the version I changed myself so all seems good so far
- Click OK
- I can also right click on my "org.example.patch" project, do a New/Other/Plug-in Development/Category Definition, leave the default name "category.xml" and click Finish
- In the editor of category.xml, press "New category", and give a name like "The incredible patch"
- Press "Add feature..." and type org.example.patch
- Save
- Reopen the feature.xml and on the Overview tab, click on the link "Export wizard"
My feature patch "org.example.patch" is selected by default; then:
- fill in a Directory path like "c:\tmp\myPatch"
- in the Options tab I check "Generate metadata repository"
check "categorize repository", press Browse..., and select category.xml
- Press Finish
When it's done:
- Help/Install New software
- Click on the Available Software sites" preferences link
- Uncheck all currently checked update sites
- Press Add... and select my "c:\tmp\myPatch" location via the "Local..." button
- Press OK / OK
- I select my update site and the Patch appears ! I can then install my patch
- I restart Eclipse when I am asked
- Go to Window/Preferences and see that "General" has been renamed into "General preferences"
- So everything worked perfectly until now. Here comes the problem: I am not happy with my patch and want to come back to the previous version of org.eclipse.ui.ide so I want to uninstall my patch:
- Help/About Eclipse/Installation Details => The patch is listed: I select it and press "Uninstall..."
- A popup showing dependencies calculations opens up, and a Error message appears saying:
- Cannot complete the install because one or more required items could not be found. Software currently installed: Eclipse for RCP and RAP Developers 1.4.1.20110909-1818 (epp.package.rcp 1.4.1.20110909-1818) Missing requirement: Eclipse Platform 3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK (org.eclipse.platform.feature.group 3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK) requires 'org.eclipse.ui.ide [3.7.0.v20110809-1737]' but it could not be found Cannot satisfy dependency: From: Eclipse for RCP and RAP Developers 1.4.1.20110909-1818 (epp.package.rcp 1.4.1.20110909-1818) To: org.eclipse.epp.package.rcp.feature.feature.group [1.4.1.20110909-1818] Cannot satisfy dependency: From: EPP RCP/RAP Feature 1.4.1.20110909-1818 (org.eclipse.epp.package.rcp.feature.feature.group 1.4.1.20110909-1818) To: org.eclipse.platform.feature.group [3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK]
[Updated on: Tue, 09 June 2015 14:53] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03403 seconds