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

Bug 387115

Summary: [import/export] Enable "Import->Install->Install Software Items from File" without explicit locations
Product: [Eclipse Project] Equinox Reporter: Nobody - feel free to take it <nobody>
Component: p2Assignee: Pascal Rapicault <pascal.rapicault>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: kane.mx, kane.zhu, nobody, pascal.rapicault, paul.verest
Version: unspecified   
Target Milestone: Kepler M4   
Hardware: All   
OS: All   
Whiteboard:

Description Nobody - feel free to take it CLA 2012-08-13 10:50:31 EDT
Context:
The Eclipse Workbench offers the "Import->Install->Install Software Items from File" capability. Per installable unit, the to be imported .p2f-files require a mandatory repository element, for instance: <repository location='http://download.eclipse.org/eclipse/updates/4.2'/>

Requirement:
Make the repository elements optional. In this case, a logic like "contact all update sites during install" of the usual installation dialog shall apply. So, in a first step the available update sites need to be queried whether the requested installable unit is contained and then installation proceeds as usual. Update sites shall be queried in succession as long as the requested installable unit is found (then this update site is taken as the source of installation), or until the requested installable unit is not found at all(-> error situation).

Reasoning: 
A common use case for this installation via "p2 import" is to easily exchange/communicate features sets, which would have otherwise been manually selected from update sites using the software installation dialog. Making repository references optional lead to much more reusable p2f-files (from the consumer perspective). For instance, some consumers can address the public Eclipse update sites whereas others are bound to use mirrors within a company network.
Comment 1 Pascal Rapicault CLA 2012-11-27 12:10:19 EST
I've added support for this - http://git.eclipse.org/c/equinox/rt.equinox.p2.git/commit/?id=5f1e6d32abe31758d61924ab19d05dc78c8ef947

Details of the change:
- On export the user now has an option (by default set to false) to decide whether or not to export entries that can't be found in a repo.
- On import when the p2f is loaded, the "contact all update site" option will be automatically enabled if the p2f has an entry without a repo.

Note that the file format has not changed and is backward compatible.