[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] External upgrades

On Tue, Jul 14, 2009 at 10:49:07AM -0700, Ian Bull wrote:
> The director can be used for platform upgrades, however, 3.4 cannot be
> upgraded to 3.5.  (Some new things were added to the metadata that 3.4
> doesn't understand).  Having said that, you might be able to use a 3.5
> director to upgrade from 3.4 to 3.5.
> 
> Has anybody tried that?

It's possible.  These steps worked for me.  I did come up with four
questions while working on this, though (below).  I'd really
appreciate it if anyone can help me with them!

1. Download the RCP package for Ganymede.

2. If you don't want to waste a lot of time waiting while you debug
your process, spend an hour or two to mirror the Galileo update site.

3. Have a Galileo-era Eclipse handy.

4. Edit the eclipse.ini in the Ganymede package to include "-startup"
"plugins/org.eclipse.osgi_<whatever>.jar", or else apply the patch
from <https://bugs.eclipse.org/bugs/show_bug.cgi?id=284630>.

5. Run:

java -jar \
  eclipse-rcp-galileo/plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar \
  -data $PWD/ws \
  -application org.eclipse.equinox.p2.director \
  -repository $PWD/updates-3.5 \
  -destination $PWD/eclipse \
  -profile PlatformProfile \
  -uninstallIUs org.eclipse.platform.ide \
  -installIUs org.eclipse.platform.ide \
  -vmargs -Declipse.p2.data.area=/space/codesourcery/eclipse/mirrors/upgrade/eclipse/p2



There's a certain amount of guesswork involved; I couldn't find out
how to get Eclipse 3.4 to tell me what feature needed to be upgraded.
If you try just org.eclipse.rcp you get:

Installing org.eclipse.rcp 3.5.0.v200906111540.
Cannot complete the install because of a conflicting dependency.
 Software being installed: Eclipse RCP 3.5.0.v200906111540 (org.eclipse.rcp 3.5.0.v200906111540)
 Software currently installed: Eclipse Platform 3.4.0.I20080617-2000 (org.eclipse.platform.ide 3.4.0.I20080617-2000)
 Only one of the following can be installed at once: 
  Eclipse RCP 3.5.0.v200906111540 (org.eclipse.rcp 3.5.0.v200906111540)
  Eclipse RCP 3.4.0.v20080507 (org.eclipse.rcp 3.4.0.v20080507)
 Cannot satisfy dependency:
  From: Eclipse Help System 1.0.0.v20080603-7r7xEHJEJkZu5nE6Q4Qrtvu6JZ9L (org.eclipse.help.feature.group 1.0.0.v20080603-7r7xEHJEJkZu5nE6Q4Qrtvu6JZ9L)
  To: org.eclipse.rcp.feature.group [3.4.0.v20080324a-989JERhEk-jWnd5IY8K5tjxB]
 Cannot satisfy dependency:
  From: Eclipse Platform 3.4.0.v20080610-9I96EhtEm-T_5LxIsybz-3MdGZmOA3uwv7Ka_M (org.eclipse.platform.feature.group 3.4.0.v20080610-9I96EhtEm-T_5LxIsybz-3MdGZmOA3uwv7Ka_M)
  To: org.eclipse.help.feature.group [1.0.0.v20080603-7r7xEHJEJkZu5nE6Q4Qrtvu6JZ9L]
 Cannot satisfy dependency:
  From: Eclipse Platform 3.4.0.I20080617-2000 (org.eclipse.platform.ide 3.4.0.I20080617-2000)
  To: org.eclipse.platform.feature.group [3.4.0.v20080610-9I96EhtEm-T_5LxIsybz-3MdGZmOA3uwv7Ka_M]
 Cannot satisfy dependency:
  From: Eclipse RCP 3.4.0.v20080324a-989JERhEk-jWnd5IY8K5tjxB (org.eclipse.rcp.feature.group 3.4.0.v20080324a-989JERhEk-jWnd5IY8K5tjxB)
  To: org.eclipse.rcp [3.4.0.v20080507]



My questions:

* The wiki page for the director runs
org.eclipse.equinox.p2.director.app.application instead of the newer
org.eclipse.equinox.p2.director.  The same is true of
<http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html>.
Is there documentation of this somewhere I missed, besides the bug?



* Is -Declipse.p2.data.area still required with the new director?



* Just installing org.eclipse.platform.ide does not work:

Cannot complete the install because of a conflicting dependency.
 Software being installed: Eclipse Platform 3.5.0.I20090611-1540 (org.eclipse.platform.ide 3.5.0.I20090611-1540)
 Software currently installed: Eclipse Platform 3.4.0.I20080617-2000 (org.eclipse.platform.ide 3.4.0.I20080617-2000)
 Only one of the following can be installed at once: 
  Eclipse Platform 3.5.0.I20090611-1540 (org.eclipse.platform.ide 3.5.0.I20090611-1540)
  Eclipse Platform 3.4.0.I20080617-2000 (org.eclipse.platform.ide 3.4.0.I20080617-2000)

I guess this might be a feature - do you have to use -uninstallIU
explicitly to ugprade features using the director?



* On a related note, how do I upgrade 'everything possible'?  Is there
a way to do that from the director - and if not, would it be
straightforward from a custom application?  I found a lot of old
packages after upgrading this way.  Numbers:

  - Ganymede RCP contained 496 bundles in plugins and features.
  - Galileo RCP contains 510 bundles.
  - 22 bundles are the same between the Ganymede and Galileo packages.
  - Upgrading this way gave me 508 bundles.  158 of those match Galileo.
    370 match the old Ganymede, i.e. were not upgraded.  Remove the
    22 common bundles and that adds up to 506.

I believe these are from not installing the right feature.  In
repeating this for our local product, I can have better control over
the root feature to avoid it, but it'd be nice to be able to say
'upgrade every feature that this repository can give you a newer
version of'.


-- 
Daniel Jacobowitz
CodeSourcery