Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 224243 - Dropins should be considered part of the base
Summary: Dropins should be considered part of the base
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-26 18:55 EDT by Nick Boldt CLA
Modified: 2008-11-13 23:20 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Boldt CLA 2008-03-26 18:55:31 EDT
Steps to reproduce - method A:

0. Unpack some EMF zip into eclipse/dropins/eclipse/emf/
1. Start up Eclipse 3.4 I20080325-2233 (linux gtk), with Sun 5.0
2. Help > Software Updates... > 
3. Select all listed IUs. CTRL-click on the Eclipse SDK IU to remove it.
4. Click Uninstall..., then Finish.
5. Click Close
6. Restart Eclipse. Repeat steps 2-6 until convinced that these features cannot be uninstalled via p2 installer.

---

Steps to reproduce - method B (scripted):

0. run this:

#!/bin/bash
workspace=/tmp/workspace-clean-34
pushd ~/eclipse/34clean >/dev/null
if [[ $# -eq 0 ]]; then
        rm -fr eclipse $workspace
        eclipse=eclipse-SDK-3.4M5-linux-gtk.tar.gz
        eclipse=eclipse-SDK-I20080324-1300-linux-gtk.tar.gz
        eclipse=eclipse-SDK-I20080325-2233-linux-gtk.tar.gz
        echo "Unpack $eclipse...";
        tar xzf $eclipse
#       echo "Patching org.eclipse.equinox.p2.ui.sdk_0.1.0.v20080317-1820.jar...";
#       cp -f org.eclipse.equinox.p2.ui.sdk_0.1.0.v20080317-1820.jar \
  eclipse/plugins/;
        emf=emf-sdo-xsd-SDK-p2break.zip
        echo "Unpack $emf into eclipse/dropins/emf/"
        unzip $emf -d eclipse/dropins/emf
fi

vm=/opt/sun-java2-5.0/bin/java
#vm=/opt/ibm-java2-5.0/bin/java

echo "Using vm=$vm and workspace=$workspace"; ./eclipse/eclipse \
  -vm $vm -data $workspace -consolelog &
popd >/dev/null

1. See method A, steps 2-6.

---

Steps to reproduce - method C:

The same effect can be seen if you use an emf.link file in eclipse/dropins/eclipse/, pointing to some other folder. Install works great. Uninstall does not.

$ cat emf.link
path=/x/home/nickb/eclipse/34clean/emf-unzipped
Comment 1 DJ Houghton CLA 2008-03-26 20:48:43 EDT

*** This bug has been marked as a duplicate of bug 224110 ***
Comment 2 John Arthorne CLA 2008-03-26 20:51:50 EDT
This is expected behavior. The key feature of dropins is that stuff you put in there gets installed automatically on startup. If you uninstall it but don't delete it, it will get re-installed on the next startup.  Of course this isn't a good end user experience. Some possibilities:

 - We could gc (delete) uninstalled bundles from dropins
 - Disable the "uninstall" action for these IUs (through some property on the IU).
 - Don't show things from dropins at all in installed features list
Comment 3 John Arthorne CLA 2008-03-26 20:52:37 EDT
I don't think this is a dup
Comment 4 Susan McCourt CLA 2008-03-26 21:07:07 EDT
> - Disable the "uninstall" action for these IUs (through some property on the
IU).
See also bug #215398 and bug #215560.  We are going to have a notion of IU's that are locked, because they are the product "base" or they are in a shared install.  That would be the way to accomplish this one.  Are drop-ins part of the "base"?

 - Don't show things from dropins at all in installed features list
This would mean removing the root IU property (which I believe we just added for M6.)  We got bugs when these dropins did not show up, so I don't think this is a good/expected answer.

So I would say we either gc them or consider them locked.
Comment 5 Nick Boldt CLA 2008-03-26 21:50:31 EDT
> So I would say we either gc them or consider them locked.

My $0.02:

Lock them -- including some visual indication like a lock icon in a left-most column of the the "Installed Features" dialog table. 

If I try to use the UI to uninstall them, prompt with either

"Link file dropins/foo.link and linked folder /path/to/linked-plugins will be deleted. Are you sure?"

 - or - 


"Drop-in folder /path/to/dropins/folder/ will be deleted. Are you sure?"

Then, on the next startup, ensure nothing tries to load them (ie., prevent the logged errors/warnings).

If you could disable IUs but not delete them, then it gets more complicated (as with deleting a project from the workspace but NOT from the disk). Not sure if we need to get that fancy just yet. ;)
Comment 6 David Carver CLA 2008-04-01 15:35:37 EDT
Not sure if this is the same thing or not, but after restarting, I would suspect that the items within the dropins folder would be deleted from eclipse/dropin.  Otherwise I'm still just going to end up with a bunch of bloat on my system with outdated plugins and items residing on the system.

Maybe I'm misunderstanding the role of the dropin folder in 3.4M6 and P2.
Comment 7 Pascal Rapicault CLA 2008-04-01 22:47:23 EDT
David, I'm note sure to understand what is your use case.
To answer your question, in p2 the dropins support provides a best effort of installation and leaves this area untouched (in that it will not perform GC on it) since it is the user who manages it.
Comment 8 David Carver CLA 2008-04-02 09:37:15 EDT
Pascal, it was my misunderstanding.  I thought the eclipse/dropin folder would act like an installation folder where the items in it would be installed from that folder into the appropriate eclipse/plugins and eclipse/features folder removing and uninstalling anything that was old or not required any longer.   However, the dropin folder acts like the old .link files concept instead, except that items are updated or removed only within the dropins folder.

Personally I would like to see an option where you have an eclipse/install folder that actually installs updates into a base eclipse system.  As it is now, to get the base system to upgrade it requires going through the Software Updates and installing the features through there instead of using the dropins folder in eclipse/dropins for the installation.
Comment 9 Pascal Rapicault CLA 2008-04-02 10:27:00 EDT
Dave, could you please open another bug report where we can carry the discussion about your enhancement. Thx.
Comment 10 David Carver CLA 2008-04-02 10:45:35 EDT
Bug 225304 opened for eclipse/install directory enhancement
Comment 11 Simon Kaegi CLA 2008-04-08 21:33:16 EDT
Susan, I've flagged this as ui although I'm not sure if we also need to do work in the dropin reconciler to flag IUs as locked.
Comment 12 Susan McCourt CLA 2008-04-09 10:59:15 EDT
Simon, the ui part of this is already covered in bug #215560.
There would be some kind of property that would need to be set to denote the drop-ins as part of the base.  So I've renamed this bug accordingly.
Comment 13 Pascal Rapicault CLA 2008-11-13 23:20:59 EST
We are not planning on doing a lot of investment in the dropins in relation to the UI.