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

Bug 342017

Summary: IU fragments may be missing in eclipse-repository
Product: z_Archived Reporter: Tobias Oberlies <t-oberlies>
Component: TychoAssignee: Project Inbox <tycho-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: hmalphettes
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Tobias Oberlies CLA 2011-04-06 09:08:34 EDT
Using a p2.inf, it is possible to create custom IU fragments that are merged into a host IU. This may for example be used to set the start level of a bundle: http://wiki.eclipse.org/Equinox/p2/Setting_Start_Levels

When creating a product archive with Tycho, the IU fragment may be installed if the host IU is installed. ("May" because not all IU fragments are installed; see notes at the bottom of the wiki page.) However unless the author of the p2.inf explicitly ensures that there is a strict version dependency to the IU fragment (as recommended in the wiki), the IU fragment will not be part of the p2 repository built by eclipse-repository. If the same product is then installed from the p2 repository using the director, the fragment IU will be missing in the installation. This case was discovered by Hughes Malphettes: https://issues.sonatype.org/browse/TYCHO-609

The behaviour of Tycho in this situation is - at least - unfortunate. It leads to very subtle problems. We should consider including all applicable IU fragments in the eclipse-repository.
Comment 1 Tobias Oberlies CLA 2011-06-02 10:52:59 EDT
After a bit of thought, I figured out that Hughes' problem is only one instance in a larger class of problems with products installed by Tycho vs. products installed from an eclipse-repository with the p2 director. Because eclipse-repository only includes IUs with a strict version dependency from the seed IUs (e.g. a product definition) by default, the eclipse-repository typically contain fewer IUs than the target platform. Therefore, a product installed from the eclipse-repository also may include fewer IUs (e.g. optional bundles or bundle fragments) than the product built by Tycho (which is built directly from the target platform).

If there is in fact significant content missing in the eclipse-repository, it becomes obvious, if installing a product from the eclipse-repository fails. However if it succeeds, this is hard to discover. My initial idea was that we should ensure that the product installation from eclipse-repository either fails, or that it yields the same result that the instalation created by Tycho. However I no longer believe that this is possible (and hence close this issue as WONTFIX).

With no automatic solution possible, we should at least make it possible to diagnose the case of unintentionally non-included content in eclipse-repository. For example an IU diff between the target platform and the eclipse-repository, and a list of reactor IUs in the target platform but not in the eclipse-repository would be useful. The latter may even be worth a warning. (-> TODO: new enhancement request)