| Summary: | Binary bundle ends up in workspace (url reader type) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Peter Kullmann <peter.kullmann> | ||||
| Component: | Buckminster | Assignee: | buckminster.core-inbox <buckminster.core-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | m.alan.underwood, thomas | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Peter Kullmann
I think this a a problem in org.eclipse.buckminster.core/src/java/org/eclipse/buckminster/core/mspec/model/MaterializationSpec.java
public String getMaterializerID(Resolution resolution) throws CoreException {
IMaterializationNode node = getMatchingNode(resolution);
String materializer = (node == null) ? null : node.getMaterializerID();
if (materializer == null) {
materializer = getMaterializerID();
if (materializer == null)
materializer = resolution.getProvider()
.getReaderType().getRecommendedMaterializer();
}
return materializer;
}
If you go with the default materialization then materializer == null in both tests.
The URLReaderType delegates to its super class (AbstractReaderType) for getRecommendedMaterializer() which returns IMaterializer.WORKSPACE.
There is no check for source="false" or for componentType="osgi.bundle" OR "eclipse.feature".
If I get the chance I'll submit a patch for this for review.
Created attachment 185792 [details]
Patch to materialize binary components with p2
This patch checks the component resolved is binary and either eclipse.feature or osgi.bundle. If so it specifies the p2 materializer.
I committed a slightly modified version where I added a parenthesis around the || terms in the if statement since && has higher precedence. Thanks for the patch. It's now committed to the helios-maintenance branch, rev 11625. . |