Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334686 - MPC needs to be updated to p2 transport refactoring
Summary: MPC needs to be updated to p2 transport refactoring
Status: RESOLVED FIXED
Alias: None
Product: MPC
Classification: Technology
Component: Install (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 blocker (vote)
Target Milestone: 1.1   Edit
Assignee: Benjamin Muskalla CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 335812 337318 337638 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-18 13:52 EST by Pascal Rapicault CLA
Modified: 2011-11-09 07:30 EST (History)
8 users (show)

See Also:


Attachments
mylyn/context/zip (6.30 KB, application/octet-stream)
2011-01-19 12:39 EST, David Green CLA
no flags Details
draft fix (18.84 KB, patch)
2011-02-18 00:16 EST, David Green CLA
no flags Details | Diff
mylyn/context/zip (111.02 KB, application/octet-stream)
2011-02-18 00:16 EST, David Green CLA
no flags Details
patch (24.31 KB, patch)
2011-02-25 15:16 EST, Benjamin Muskalla CLA
greensopinion: iplog+
Details | Diff
mylyn/context/zip (402.92 KB, application/octet-stream)
2011-02-25 15:17 EST, Benjamin Muskalla CLA
no flags Details
fix (1.81 KB, patch)
2011-02-25 19:36 EST, Benjamin Muskalla CLA
greensopinion: iplog+
Details | Diff
mylyn/context/zip (19.02 KB, application/octet-stream)
2011-03-01 15:51 EST, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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).