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

Bug 334686

Summary: MPC needs to be updated to p2 transport refactoring
Product: [Technology] MPC Reporter: Pascal Rapicault <pascal>
Component: InstallAssignee: Benjamin Muskalla <b.muskalla>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P2 CC: b.muskalla, contact, eclipse, fonduee, greensopinion, iman760, kai.toedter, remy.suen
Version: unspecified   
Target Milestone: 1.1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip
none
draft fix
none
mylyn/context/zip
none
patch
greensopinion: iplog+
mylyn/context/zip
none
fix
greensopinion: iplog+
mylyn/context/zip none

Description Pascal Rapicault CLA 2011-01-18 13:52:27 EST
In 3.7 M5, p2 transport code got refactored. The immediate consequence is that MPC no longer works on 3.7.
Comment 1 David Green CLA 2011-01-19 12:38:42 EST
Thanks Pascal.  

From what I can see @org.eclipse.equinox.internal.p2.repository.RepositoryTransport@ has moved to a bundle with symbolic name @org.eclipse.equinox.p2.repository.impl@

Is there any chance of p2 transport code becoming API? (ie: RepositoryTransport)
Comment 2 David Green CLA 2011-01-19 12:39:05 EST
Created attachment 187135 [details]
mylyn/context/zip
Comment 3 Pascal Rapicault CLA 2011-01-24 23:16:18 EST
We currently have no plan to make an official API around Transport, however know that we will try to treat the class org.eclipse.equinox.internal.p2.repository.Transport as such (or at least try to minimize the breakages).
To access it (in 3.7) you will have to look up an actual implementation using a p2 agent instance.
Comment 4 David Green CLA 2011-01-26 18:27:41 EST
(In reply to comment #3)

Thanks for the heads-up Pascal.
Comment 5 David Green CLA 2011-02-16 14:48:53 EST
*** Bug 337318 has been marked as a duplicate of this bug. ***
Comment 6 David Green CLA 2011-02-18 00:16:44 EST
Created attachment 189250 [details]
draft fix

I've drafted a possible fix to this problem.  Note that the @Eclipse36TransportFactory@ will probably need compiling against the version of p2 that shipped with Eclipse 3.6.  In that case, we can commit the class file for that class only.
Comment 7 David Green CLA 2011-02-18 00:16:49 EST
Created attachment 189251 [details]
mylyn/context/zip
Comment 8 Remy Suen CLA 2011-02-18 10:13:43 EST
Hit this today while testing Indigo MPC on 4.1. :)
Comment 9 David Green CLA 2011-02-21 12:32:18 EST
*** Bug 337638 has been marked as a duplicate of this bug. ***
Comment 10 Benjamin Muskalla CLA 2011-02-25 15:16:57 EST
Created attachment 189846 [details]
patch

David, here is my suggested patch for this. This compiles and runs against 3.6,3.7 and 4.1. I refactored your code pretty much but pattern remains the same. I moved several methods up into the Factory to share them between the implementations.
Comment 11 Benjamin Muskalla CLA 2011-02-25 15:17:05 EST
Created attachment 189847 [details]
mylyn/context/zip
Comment 12 David Green CLA 2011-02-25 18:40:41 EST
I've applied the patch with some changes.  Notably, I've moved any compile-time dependencies on p2 internals out of the TransportFactory class in case things change again in the future.  Benjamin can you take this for a spin on both platforms?  If it looks good to you, please resolve this task.
Comment 13 Benjamin Muskalla CLA 2011-02-25 19:36:16 EST
Created attachment 189870 [details]
fix

David, you missed one change of the initial patch in the ProvisioningJobListener to use the new TransportFactory.
Comment 14 David Green CLA 2011-03-01 15:51:16 EST
Patch applied, thanks Benjamin.  I missed that part (the patch didn't apply cleanly)
Comment 15 David Green CLA 2011-03-01 15:51:19 EST
Created attachment 190090 [details]
mylyn/context/zip
Comment 16 Benjamin Cabé CLA 2011-03-02 13:28:35 EST
*** Bug 335812 has been marked as a duplicate of this bug. ***
Comment 17 FewG CLA 2011-03-12 06:21:13 EST
How to apply this fix?
Comment 18 Benjamin Muskalla CLA 2011-03-12 06:54:16 EST
The fix is already part of the current MPC HEAD and will be released together with the next build for indigo (next Wednesday).