Improvements Eclipse Installation

sami wagiaalla swagiaal at
Wed Oct 26 15:20:46 UTC 2011


The way we currently install Eclipse plugins in Fedora is incorrect and 
somewhat fragile.

RPM places all the plugin artifacts in the proper directories. However 
that does not update the eclipse metadata. This means that until the 
next time eclipse starts it is unaware of the newly installed plugins.

Because the user would normally run Eclipse not as root Eclipse does not 
have permission to write to the meta data files located in the 
installation directory. It therefore creates a parallel version in the 
user's home directory ~/.eclipse. This creates a fragile installation 
and leads to a whole host of problems.

To improve this I have written apatch which runs the Eclipse reconciler 
during rpm installation. The Eclipse reconciler is an Eclipse 
application which goes through and checks the installation directories 
and updates the eclipse metadata with any newly installed plugins.

To add support for this in your eclipse package you have to add the 
following line to your rpm spec file:

%_eclipse_pkg [package name]

Here is an example from the eclipse-rse spec file for the
eclipse-rse-sdk rpm:

%package   sdk
%_eclipse_pkg sdk

The above macro expands to the following:

%post sdk
touch /var/run/eclipse/run-reconciler

%postun sdk
touch /var/run/eclipse/run-reconciler

if [ $1 == 0 ]; then

%posttrans sdk

I apologize if you have experienced instability in Eclipse installations 
on rawhide, it is probably due to these changes. Please let me know if 
you have any comments questions or suggestions.

I will be filing a request to update the Eclipse packaging guidelines.

If you are interested in the details of the work, here is a summary in 
the form of a patch:


More information about the devel mailing list