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

Bug 225537

Summary: [rum] standaloneUpdate fails with 3.4M6 on build.eclipse.org
Product: [Eclipse Project] Equinox Reporter: Martin Oberhuber <mober.at+eclipse>
Component: p2Assignee: DJ Houghton <dj.houghton>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, david_williams, john.arthorne, kim.moir, mark.melvin, mary, mknauer, pascal, philippe_mulet, rcleveng, richard.gronback, Sergey.Armensky, ted, vivkong
Version: 3.4   
Target Milestone: 3.4   
Hardware: Power PC   
OS: Linux-GTK   
URL: http://download.eclipse.org/eclipse/downloads/drops/S-3.4M6-200803301350/
Whiteboard:
Attachments:
Description Flags
Plugin providing command line app none

Description Martin Oberhuber CLA 2008-04-03 07:57:24 EDT
Here's a script that used to work fine with Eclipse 3.3 upto Eclipse 3.4M5 but fails with a freshly installed 3.4M6:

mkdir /opt/public/dsdp/tm/ws2/cdt.tmp
cd /opt/public/dsdp/tm/ws2/cdt.tmp
wget "http://download.eclipse.org/tools/cdt/builds/5.0.0/I.I200802111122/cdt-master-5.0.0-I200802111122.zip"
unzip cdt-master-5.0.0-I200802111122.zip
java -jar /opt/public/dsdp/tm/ws2/eclipse-3.4M5-linux-gtk-ppc/eclipse/plugins/org.eclipse.equinox.launcher_1.0.*.jar -application org.eclipse.update.core.standaloneUpdate -command install -featureId org.eclipse.cdt -version 5.0.0.200802111122 -from file:///opt/public/dsdp/tm/ws2/tmp.cdt
Featureorg.eclipse.cdt 5.0.0.200802111122has successfully been installed
Command completed successfully.

Here is the result of exactly the same command on 3.4M6:

java -jar /opt/public/dsdp/tm/ws2/eclipse-3.4M6-linux-gtk-ppc/eclipse/plugins/org.eclipse.equinox.launcher_1.0.*.jar -application org.eclipse.update.core.standaloneUpdate -command install -featureId org.eclipse.cdt -version 5.0.0.200802111122 -from file:///opt/public/dsdp/tm/ws2/tmp.cdt
Command failed. Please check log file /opt/public/dsdp/tm/ws2/eclipse-3.4M6-linux-gtk-ppc/eclipse/configuration/1207222999059.log
 for details.

Contents of the mentioned file is:
!ENTRY org.eclipse.update.core 4 0 2008-04-03 07:43:29.581
!MESSAGE Cannot install featureorg.eclipse.cdt 5.0.0.200802111122

I tried various variants of the URL after -from (adding /site.xml, playing with prefix slashes, using -from http://download.eclipse.org/releases/ganymede) but they all fail.

After manually removing P2 as per
   http://wiki.eclipse.org/Equinox_p2_Removal
the command works on 3.4M6 just as it did on 3.4M5. But having to manually remove stuff is not an option for me in an unattended nightly build that should be reproducable by means of a script. So, at the very minimum what I need is the un-P2ized downloadable eclipse-SDK archive that's mentioned on the Remove page but has not yet appeared on the download page,
  http://download.eclipse.org/eclipse/downloads/drops/S-3.4M6-200803301350/
Comment 1 Martin Oberhuber CLA 2008-04-03 08:07:32 EDT
Note: I did not try using the dropins/ folder for the CDT download because what I have here is a compressed update site, and the P2 Getting Started Wiki:
  http://wiki.eclipse.org/Equinox_p2_Getting_Started#Dropins

talks about possibility to drop plugins, features, extension locations or installations but it does NOT talk about possibility to drop in update sites or compressed update sites (where the features are not expanded but in Jars, and potentially also some plugins need to be unpacked).
Comment 2 Martin Oberhuber CLA 2008-04-03 08:12:00 EDT
Here is an automatic removal script that saved the day for me: It gets rid of P2 as per the Wiki, and finally made the standaloneUpdate work:

  # Remove P2 due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=225537
  # See http://wiki.eclipse.org/Equinox_p2_Removal
  rm -rf eclipse/configuration/* eclipse/configuration/.settings
  cp ../eclipse-3.3-linux-gtk-ppc/eclipse/configuration/config.ini eclipse/configuration
  cp -f ../eclipse-3.3-linux-gtk-ppc/eclipse/eclipse.ini eclipse/
  rm -rf eclipse/features/org.eclipse.equinox.p2.user.ui*
  rm -f eclipse/plugins/org.eclipse.equinox.p2.*
  rm -rf eclipse/p2
  # </Remove P2>
Comment 3 Pascal Rapicault CLA 2008-04-04 12:43:07 EDT
Created attachment 94882 [details]
Plugin providing command line app

Martin, the work on full interop with update manager and p2 is not complete yet and you are being hit by this.

Going forward I would recommend you to replace the invocation of the um commands by the following p2 command line operation <line return just here for clarity>:
  -application org.eclipse.equinox.p2.director.app.application
  -metadataRepository file:d:/tmp/cdt/site.xml
  -artifactRepository file:d:/tmp/cdt/site.xml
  -installIU org.eclipse.cdt.feature.group

Note that the parameter to the installIU is the featureId suffixed by "feature.group" (e.g. in this case the CDT feature id was org.eclipse.cdt.feature).

I attach here the plug-in providing the command line application  because it is not yet part of the SDK (bug 225778).
Comment 4 Martin Oberhuber CLA 2008-04-04 13:05:06 EDT
Thanks Pascal. I appreciate the extra plugin as well as instructions how to use it. But this doesn't help me coming up with a script to automatically install from the update site, in a form that only uses CVS-tagged repository artifacts (for the build being reproducable).

IMHO a sensible workaround needs to come up with instructions that only involve artifacts which will remain intact in the future and allow a reproducable build. Such as the already promised un-p2ized downloadable eclipse SDK for instance.

Until such a workaround is available the bug is still a major regression for me, because it keeps me from doing what I need to do in a sensible manner. 

OK I could download eclipse-platform-3.3 for the sole purpose of getting its eclipse.ini and config.ini files but that's not a very nice solution, is it?
Comment 5 Pascal Rapicault CLA 2008-04-04 13:17:16 EDT
I'm sorry but I'm not sure I understand what you mean by:
> But this doesn't help me coming up with a script to automatically install
from the update site, in a form that only uses CVS-tagged repository artifacts
(for the build being reproducable).
  Could you please give me more details here, or maybe directly call me (and then I could summarize the discussion here).
Comment 6 Martin Oberhuber CLA 2008-04-04 13:21:51 EDT
Long Story short, I want this to happen:

http://wiki.eclipse.org/Equinox_p2_Getting_Started#Removing_p2

"In addition, to help smooth the transition for adopters, the platform 3.4 M6 build will have a copy available with p2 removed for you."

Making my automated script to build RSE much simpler and work the same way it's been working since Eclipse 3.2 (no more regression, not for me nor for others).
Comment 7 John Arthorne CLA 2008-04-04 13:36:24 EDT
We decided instead to provide a script that will remove p2 from any 3.4 build. This is now available on the Eclipse project download page from 3.4 M6 onwards (see link on right hand side of the page).
Comment 8 DJ Houghton CLA 2008-04-15 13:38:30 EDT
Work covering the synchronization between the platform.xml and p2's bundles.info file is covered by bug 224482.

The script for removing p2 from a build is attached to bug 224908.

From reading Martin's comments, it sounds like he wants a non-p2 version of the SDK so I will mark this bug as a duplicate. If there is something else that you are looking for, please re-open.

*** This bug has been marked as a duplicate of bug 224908 ***
Comment 9 John Arthorne CLA 2008-04-29 21:03:48 EDT
Martin, we've made a lot of progress in handling compatibility with standalone update, so if you are still using these scripts it would be good feedback to know if this is working for you in M7 candidate builds. You should be able to use legacy standalone update and p2 will synchronize automatically on the next startup of the target. Of course, moving to p2 tools is still a better long term answer because it will enable you to take advantage of p2 capabilities not available in UM.
Comment 10 Martin Oberhuber CLA 2008-05-02 18:39:34 EDT
Verified old commandline update manager app works in I20080502-0100 (3.4M7)