Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jan 2010 01:02:48 +0200
From:      Andrey Kosachenko <andrey.kosachenko@gmail.com>
To:        freebsd-eclipse@FreeBSD.org
Cc:        sepotvin@FreeBSD.org
Subject:   Re: Eclipse 3.5.1
Message-ID:  <4B490B18.1090609@gmail.com>
In-Reply-To: <76dec37a1001061654p697594e7xa840e5bf0e120d59@mail.gmail.com>
References:  <4B3A1084.90505@videotron.ca> <4B3B27CB.7040906@fstaals.net> <4B3BD120.40108@FreeBSD.org> <4B3CA19D.9050504@fstaals.net> <4B3DD4E3.60902@gddsn.org.cn> <4B3EF82E.3090708@gddsn.org.cn> <4B3F1E20.2020703@fstaals.net> <4B44AA3E.40306@FreeBSD.org> <76dec37a1001061654p697594e7xa840e5bf0e120d59@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi, guys,

Just my 5 cents regarding plugins installation challenge.

Honestly speaking, I'd like to gain complete understanding how things 
should work, because it is very easy to screw up yourself with all that 
fancy stuff :(.

I'm also 100% able to reproduce plugins issue here: i.e. I can install 
any plugin by means of eclipse software installer (p2), installation 
goes smoothly but on the next launch installed plugin(s) won't be picked 
up. Okay, at this point I'd like to emphasize that there is _no_ 
'installation' issue, the real issue I believe that eclipse does not 
suck into the list of plugins installed by ordinary user.

So far so good because we have an option here: i.e. put stuff manually 
into dropins folder (/usr/local/share/eclipse/dropins or somewhere else 
(actually where org.eclipse.equinox.p2.reconciler.dropins.directory 
points to)). p2 should take care about dropins/* updates (at least 
documentation states so). Though subsequent updates will be stored into 
~/.eclipse/org.eclipse.platform_3.5.0_94697585/*. The latter looks a bit 
odd :).

But I'm just thinking about complete p2 utilization (i.e. without 
involving installation via dropins ('watched directories' concept)).
I did some tests and, unfortunately, haven't gained any solution which I 
really liked.

Briefly:
- As far as I understood we stick with shared installation concept (case 
of Linux, BSD and alike systems), when the core stuff is installed 
somewhere in the system and only root is able to append stuff into that 
layout (so-called 'based' configuration);

- unprivileged user is able to utilize core stuff without additional 
settings;

- when it goes about additional plugins user may require then several 
options are possible:

1) utilization of dropins folder (repeats old well-known 'wild west' 
approach with copying stuff into plugins/ features/ folders and 
subsequent lanunch with '-clean' parameter);

2) 'bundle pools' (relatively new concept for multi-user/multi-instance 
configurations);

3) various means assuming utilization of *.lnk, .eclipseextension, 
copying into plugins/* features/*, enabling legacy update manager and so 
forth...

Okay, let get back to plugins issue. AFAIU eclipse loads only stuff 
listed in /usr/local/lib/eclipse/configuration/config.ini. All plugins 
that ordinary user installs via p2 are stored into 
~/.eclipse/org.eclipse.platform_3.5.0_94697585/*. Obviously ordinary 
user has no privilege to write into 
/usr/local/lib/eclipse/configuration/config.ini. So records go into 
~/.eclipse/org.eclipse.platform_3.5.0_946975857/configuration/config.ini. And 
it looks like eclipse merges records from both config.ini files in order 
to build list of installed plugins, but it loads plugins _only_ from the 
main (the first one) config.ini.

So, the question is how to force it to load plugins from 'right' 
config.ini. Basically there is a room for various hacks here. For 
example it is possible to adjust 
org.eclipse.equinox.simpleconfigurator.configUrl. But this is not a case 
for mult-iuser configurations (okay, this is not quite true, because I 
believe it is possible to use @user.home, though I'm not sure if it is a 
good idea to put variables like that into shared configuration area in 
case of very strict policies). I also had no luck with 
osgi.configuration.cascaded set to 'true'...

Okay, to make a long story short, seems so far I had in store only one 
very simple (but not elegant) trick which allows to do pure p2 
installation/updates. It works for me quite well:
- install new eclipse as usual;
- run eclipse under ordinary user (to create layout under ~/.eclipse);
- exit eclipse application;
- mv /usr/local/lib/eclipse/configuration 
/usr/local/lib/eclipse/configuration.orig;
- run eclipse again; install all required plugins via p2; eclipse should 
pick up all required info from ~/.eclipse directory along with all 
locally installed plugins.

PS:
I believe this is definitely not right way to go. And I don't like it. 
But I also dislike to move things around using dropins folder or 
whatsoever. I also assume that I have no deep understanding how things 
should work with brand new p2. So any corrections/notions/ideas are welcome.

On 07.01.2010 02:54, Marcelo/Porks wrote:
> On Wed, Jan 6, 2010 at 1:20 PM, Stephane E. Potvin<sepotvin@freebsd.org>  wrote:
>> Hi,
>>
>> Picking up a random commit about plugins problems, could all of those that have problem installing plugins try again with a clean
>> ~/.eclipse directory and send me the eclipse log if there's a failure? I've not been able to reproduce any such problems locally.
>> Make sure that the main directory is not writable by the user that run the eclipse platform, otherwise it will create files that
>> will be left behind on the next update and probably break havoc. If you've run eclipse as a user that can write to the main eclipse
>> directory, uninstall eclipse first, manually remove the ${PREFIX}/lib/eclipse directory and reinstall.
>
> Hi,
>
> I did:
> - make deinstall at the port dir
> - removed the ~/.eclipse
> - removed the /usr/local/lib/eclipse
> - removed the /usr/port directory
> - got again the ports tree, applied the patch and installed the port
>
> Everything works great at the eclipse 3.5 also the eclipse updater
> (Help -->  Install new software).
>
> I installed the WTP (http://download.eclipse.org/webtools/updates/),
> the installation goes well. But I cant see the WTP installed.
>
> I had already restarted the eclipse, but there's neither new icon at
> "Help -->  About Eclipse SDK" nor "dynamic project" at "File -->  new
> -->  Other -->  Java -->  Web"
>

---
WBR,
Andrey Kosachenko



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B490B18.1090609>