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

Bug 222157

Summary: [planner] Projector should get fragments dependencies
Product: [Eclipse Project] Equinox Reporter: Pascal Rapicault <pascal>
Component: p2Assignee: Pascal Rapicault <pascal>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: adreghiciu, leberre
Version: 3.4Flags: leberre: review+
Target Milestone: 3.6 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 222158    
Bug Blocks:    
Attachments:
Description Flags
Proposed patch for fragments & unit tests
none
New patch none

Description Pascal Rapicault CLA 2008-03-10 22:21:08 EDT
Currently the PBProjector gets the dependencies from fragment to their host simply because those are being also found in the requirements of IU. 
Instead it should get the host/fragment deps by using IIUFgt#getHost().
Comment 1 Pascal Rapicault CLA 2008-04-23 15:41:28 EDT
A similar problem happens for the patches and their concept of lifecycle.
Comment 2 Alin Dreghiciu CLA 2010-03-29 23:15:38 EDT
Created attachment 163355 [details]
Proposed patch for fragments & unit tests

Attached patch solves the described problem. This is done by not using requirements looping as a trigger for determining potential hosts but host requirements directly.
I also changed IUFragment implementation to not automatically add host requirements as required capabilities, so solving also bug #222158.

As proven by added unit tests, the solution also solve bug #307271, so host is not required to be present case when the fragment does not get attached.
Comment 3 Alin Dreghiciu CLA 2010-03-29 23:20:25 EDT
Forgot to mention that if the fragment has other sorts of requirements those will still be processed as till now.

For the existing situation, where people expressed host requirements also as requirements situation will remain unchanged.
Comment 4 Pascal Rapicault CLA 2010-05-07 16:48:19 EDT
Created attachment 167574 [details]
New patch

Here is a new patch. At this point I have not done the changes wrt removals of the host requirements from the regular requirements of the fragment.
Daniel, could you please review this patch.
Comment 5 Daniel Le Berre CLA 2010-05-07 18:22:53 EDT
+1
Comment 6 Pascal Rapicault CLA 2010-05-09 15:10:56 EDT
I have released additional changes for the persistence aspect of this work.
Comment 7 Pascal Rapicault CLA 2010-05-09 15:11:22 EDT
.
Comment 8 Pascal Rapicault CLA 2010-05-10 12:15:12 EDT
.
Comment 9 Pascal Rapicault CLA 2010-05-10 21:52:15 EDT
Fixed