Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358094

Summary: [shared] Installing plugin into central shared eclipse breaks p2 cascaded configurations
Product: [Eclipse Project] Equinox Reporter: James Blackburn <jamesblackburn+eclipse>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, loskutov, pascal.rapicault, pascal, pierre-charles.david
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Bug Depends on:    
Bug Blocks: 358471    

Description James Blackburn CLA 2011-09-19 07:14:56 EDT
Steps to reproduce:

tar -zxvf egit.tgz
tar -zxf eclipse-platform-3.7-linux-gtk-x86_64.tar.gz
mv eclipse eclipse-platform
mkdir workspace

#Install a dropin into cascaded config, and verify it has worked.
mkdir -p cascaded-config/dropins
echo "path=`pwd`/1.1.0" > cascaded-config/dropins/egit.link

# Verify that the drop-in has worked
# "Git Repository Exploring" perspective should be there:
./eclipse-platform/eclipse -install eclipse-platform/ -configuration `pwd`/cascaded-config/config -Dosgi.checkConfiguration=true -Dosgi.sharedConfiguration.area=`pwd`/eclipse-platform/configuration -Dosgi.sharedConfiguration.area.readOnly=true -Dosgi.configuration.cascaded=true -data workspace


# Install the error log view in eclipse-platform:
cd eclipse-platform
./eclipse -application org.eclipse.equinox.p2.director -consolelog -nosplash \
          -repository http://download.eclipse.org/eclipse/updates/3.7 \
	  -installIU org.eclipse.ui.views.log
cd ..


# Re-run eclipse, egit has disappeared!

./eclipse-platform/eclipse -install eclipse-platform/ -configuration `pwd`/cascaded-config/config -Dosgi.checkConfiguration=true -Dosgi.sharedConfiguration.area=`pwd`/eclipse-platform/configuration -Dosgi.sharedConfiguration.area.readOnly=true -Dosgi.configuration.cascaded=true -data workspace

# Note there are no errors in the error log (other than unable to instantiate the Git Repo Exploring perspective).

# Destroy the cascaded config and restart:
rm -r cascaded-config
mkdir -p cascaded-config/dropins
echo "path=`pwd`/1.1.0" > cascaded-config/dropins/egit.link
./eclipse-platform/eclipse -install eclipse-platform/ -configuration `pwd`/cascaded-config/config -Dosgi.checkConfiguration=true -Dosgi.sharedConfiguration.area=`pwd`/eclipse-platform/configuration -Dosgi.sharedConfiguration.area.readOnly=true -Dosgi.configuration.cascaded=true -debug p2.options > p2.trace


Having done this, trying to install egit from the central update site (using cascading configs as above also fails), point p2 at:
http://download.eclipse.org/egit/updates
And the installation appears to silently fail.
Comment 1 James Blackburn CLA 2011-09-19 07:31:42 EDT
Doesn't seem to require dropins.  Simple steps to reproduce:

tar -zxf eclipse-platform-3.7-linux-gtk-x86_64.tar.gz
mv eclipse eclipse-platform
mkdir workspace

#Install a dropin into cascaded config, and verify it has worked.
mkdir -p cascaded-config/dropins

# Install the error log view in eclipse-platform:
cd eclipse-platform
./eclipse -application org.eclipse.equinox.p2.director -consolelog -nosplash \
          -repository http://download.eclipse.org/eclipse/updates/3.7 \
	  -installIU org.eclipse.ui.views.log
cd ..

# Run eclipse with a cascaded configuration
./eclipse-platform/eclipse -install eclipse-platform/ \
       -configuration `pwd`/cascaded-config/config -Dosgi.checkConfiguration=true \
       -Dosgi.sharedConfiguration.area=`pwd`/eclipse-platform/configuration \
       -Dosgi.sharedConfiguration.area.readOnly=true -Dosgi.configuration.cascaded=true \
       -data workspace

Help > Install New Software
Point at:
  http://download.eclipse.org/egit/updates
  And choose Eclipse Egit and Eclipse Jgit.
Restart 
  Plugins aren't present in the IDE, though they can be seen under:
    Help > About Eclipse Platform > Installation Details > Installed Software shows them as installed.
   &&
    cascaded-config/plugins/org.eclipse...
  but not under the Plugins or Configuration tab.
  

Note if you don't install org.eclipse.ui.views.log first, then everything works...

Note there aren't any obvious errors in the error log.
Comment 2 James Blackburn CLA 2011-09-19 07:38:13 EDT
The platform release I'm using is just the one from here:
http://download.eclipse.org/eclipse/downloads/drops/R-3.7-201106131736/index.php
Comment 3 DJ Houghton CLA 2011-09-20 16:18:12 EDT
James, I will try your steps but one thing I wanted to mention is there is a "bug" where if you specify vm args on the command line then it won't use the ones in the eclipse.ini file. Also I noticed that your command-line didn't contain -vmargs so maybe that is needed too? I would recommend putting all the args in the eclipse.ini and then trying it. (which is what I will do as well)
Comment 4 James Blackburn CLA 2011-09-20 16:32:19 EDT
Thanks DJ that's interesting to know. 

As it happens the steps work fine if I don't install the error log plugin - egit is installed into the plugins directory of the cascaded config dir. 

What's also interesting is that I've always installed a feature into a platform releases and use that as the base of my multi user shared installs. All worked fine until I attempted to install the error log plugin in this way. I wonder if there's an issue installing a plugin by name vs installing features?
Comment 5 DJ Houghton CLA 2011-09-20 16:36:29 EDT
Oops, I should have searched because it appears that bug was fixed in 3.7 (bug 323533). But the script should probably also have the missing -vmargs command.

Adding Pascal to the CC in case he has insight about installing bundles directly.
Comment 6 Pascal Rapicault CLA 2012-11-29 16:08:05 EST

*** This bug has been marked as a duplicate of bug 304132 ***