| Summary: | [publisher] Add a new flag to the UpdateSitePublisherApplication to generate the JRE's IU. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Hugues Malphettes <hmalphettes> | ||||
| Component: | p2 | Assignee: | Pascal Rapicault <pascal> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | irbull, kking1276, pascal, tjwatson | ||||
| Version: | 3.6 | Flags: | tjwatson:
iplog+
|
||||
| Target Milestone: | 3.6.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
The suggested workaround consists of adding this code to the org.eclipse.equinox.internal.p2.updatesite.UpdateSitePublisherApplication:
/** by default don't generate the JRE IU */
private boolean addJRE = false;
/**
* Detect the flag -addJREIU to turn on the generation of the JREIU.
*/
protected void processFlag(String flag, PublisherInfo publisherInfo) {
super.processFlag(flag, publisherInfo);
if (flag.equalsIgnoreCase("-addJREIU"))//$NON-NLS-1$
{
addJRE = true;
}
}
protected IPublisherAction[] createActions() {
LocalUpdateSiteAction action = new LocalUpdateSiteAction(source, categoryQualifier);
action.setCategoryVersion(categoryVersion);
if (addJRE) {
return new IPublisherAction[] {action, new JREAction((String)null)};
}
return new IPublisherAction[] {action};
}
Thx for the patch. Fixed in HEAD and 3.6.x There was a problem with tagging HEAD so this will appear in the first integration build after 3.7 M2. |
Created attachment 169037 [details] p2repository for a single feature that contains a single jar: javax.activation The update site generated by P2 cannot be used to provision a new Target Platform if any of the bundles import a package provided by the JRE. To reproduce the issue: - Unzip the attached file. It is a repository that contains a single feature with a single bundle: javax.activation provided by orbit. - Use eclipse-3.6M7 PDE to create a new target platform and start using a blank one. - Try to provision this target platform with the local site and keep the default option "Include Required Dependencies". This will use the planner and will report some missing packages that are provided by the JRE. I have filed a request for enhancement against PDE to support the JRE's IU by default when the Execution environment is defined: #311795 On the p2 side, I'll attach a workaround which consists of detecting a new flag, for example "-addJREIU" to generate the a.jre.javase IU.