Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Can't uninstall RCP feature patch(Using the Eclipse wizard)
Can't uninstall RCP feature patch [message #1697336] Wed, 03 June 2015 09:25 Go to next message
Philippe Craeye is currently offline Philippe CraeyeFriend
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

Re: Can't uninstall RCP feature patch [message #1715969 is a reply to message #1697336] Sun, 29 November 2015 19:35 Go to previous message
Philippe Craeye is currently offline Philippe CraeyeFriend
Messages: 2
Registered: June 2015
Junior Member
Hello

I come back to you after several months, still hoping someone could help me Rolling Eyes

My problem remains the same: the procedure described in my previous post to uninstall a feature patch, through the "Uninstall" button in "/Help/About/Installation Details/Installed Software" is not working as there's always a message that appears, complaining about the previous version of the plugin (that was patched) considered missing.

I tried the process described in my previous post against the latest Eclipse version and it still does not work:

Eclipse IDE for Eclipse Committers
Version: Mars.1 Release (4.5.1)
Build id: 20150924-1200

Error:
Cannot complete the install because one or more required items could not be found.
Software currently installed: Eclipse IDE for Eclipse Committers 4.5.1.20150917-1200 (epp.package.committers 4.5.1.20150917-1200)
Missing requirement: Eclipse Platform 4.5.1.v20150904-0015 (org.eclipse.platform.feature.group 4.5.1.v20150904-0015) requires 'org.eclipse.ui.ide [3.11.0.v20150825-2158]' but it could not be found
Cannot satisfy dependency:
From: Eclipse IDE for Eclipse Committers 4.5.1.20150917-1200 (epp.package.committers 4.5.1.20150917-1200)
To: org.eclipse.epp.package.committers.feature.feature.group [4.5.1.20150917-1200]
Cannot satisfy dependency:
From: EPP Eclipse IDE for Eclipse Committers Feature 4.5.1.20150917-1200 (org.eclipse.epp.package.committers.feature.feature.group 4.5.1.20150917-1200)
To: org.eclipse.platform.feature.group 0.0.0

I did a very dumb patch for the feature org.eclipse.platform with a change upon the plugin org.eclipse.ui.ide by:

  • changing the first label in the plugin.properties file from "Plugin.name = Eclipse IDE UI" to "Plugin.name = Eclipse IDE UI (Super Patch)"
  • changing the plugin version from 3.11.0.v20150825-2158 to 3.11.100.v20151129-2000
  • creating a "Feature patch" project, as described in the previous post

You'll find attached

  • the code to import via a 'File/Import/General/Existing Projects into workspace/Select archive file"' (filename: code_for_superpatch.zip)
  • the patch itself you can install on a Mars SR1

After having installed the feature patch, make sure it's correctly installed by looking at

  • /Help/About/Installation Details/Plug-ins/": in the column "Plug-In Name" in front of the plugin "org.eclipse.ui.ide", you'll see (Super Patch) !
  • /Help/About/Installation Details/Installed software/": the patch "Patch_UI_IDE" is listed: on this tab press uninstall => the operation cannot be completed"


If someone could try it out, I would greatly appreciate.
Many thanks in advance.
Phil
Previous Topic:ConfiguratorManipulator not getting called
Next Topic:How to clean unused plugins from shared bundle pool
Goto Forum:
  


Current Time: Tue Nov 12 01:07:08 GMT 2024

Powered by FUDForum. Page generated in 0.03403 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top