Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333588 - Source components in target platform ignored
Summary: Source components in target platform ignored
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 333253
  Show dependency tree
 
Reported: 2011-01-05 13:07 EST by Michal Ruzicka CLA
Modified: 2019-02-25 14:39 EST (History)
2 users (show)

See Also:


Attachments
workspace-demonstration.zip (668.61 KB, application/octet-stream)
2011-01-06 05:16 EST, Michal Ruzicka CLA
no flags Details
org.eclipse.buckminster.pde-tp_features_build.patch (5.56 KB, patch)
2011-01-18 08:13 EST, Michal Ruzicka CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Ruzicka CLA 2011-01-05 13:07:26 EST
STEPS TO REPRODUCE:
1) have a target platform containing a feature - "com.example.base.feature" - and its corresponding source feature - "com.example.base.source.feature"; the "com.example.base.feature" includes a bundle - "com.example.base", the source feature includes corresponding source bundle - "com.example.base.source", both of these bundles are present in the target platform too
2) have another feature - "com.example.core.feature" - which includes the "com.example.base.feature"
3) have yet another feature - "com.example.core.build.feature" - which includes the "com.example.core.feature" and is only used to build a p2 repository 
4) invoke the Buckminster's "site.p2" action on the "com.example.core.build.feature"

ACTUAL RESULT:
a p2 repository is created containing the following "base" components:
	"com.example.base.feature" feature
	"com.example.base.source.feature" feature
	"com.example.base" bundle
the "com.example.base.source.feature" is not the same as that from the target platform, despite their versions (including qualifiers) match; the newly created one does not include any features or bundles but that from the target platform includes the "com.example.base.source" bundle

EXPECTED RESULT:
a p2 repository is created containing the following "base" components:
	"com.example.base.feature" feature
	"com.example.base.source.feature" feature
	"com.example.base" bundle
	"com.example.base.source" bundle
the "com.example.base.source.feature" is the same is that from the target platform, the "com.example.base.source" bundle is also the same as that from the target platform

ADDITIONAL INFO:
To put it simple: Buckmisnter should use source components from target platform corresponding to binary components it includes in a p2 repository it creates and include them in that repository too (provided that the build of source components is not disabled).
Comment 1 Michal Ruzicka CLA 2011-01-06 05:16:44 EST
Created attachment 186156 [details]
workspace-demonstration.zip

The attached file contains a workspace with projects demonstrating the issue.
To produce the p2 repository containing the wrong source feature (and missing the expected source bundle) invoke the "site.p2" action on the "com.example.core.build.feature" while supplying "com.example.core.build.feature/buckminster.properties" as the property file to the action.

The output of the build should go to:
	${worspace.root}/build/core
the resulting p2 repo should be then found in:
	${worspace.root}/build/core/com.example.core.build.feature_1.0.0-eclipse.feature\site.p2

The generated "com.example.base.source.feature_1.0.0.xxxxxxxxxxx.jar" feature found in the repo is the wrong one - same version including qualifier as that from the target platform but not including any components in contrast.

Note that sources for the "com.example.base.*" components are also included in the zip file, but they are not registered in the workspace. You'd need to import them into the workspace should you want to inspect them in the IDE.
Comment 2 Michal Ruzicka CLA 2011-01-18 08:13:32 EST
Created attachment 186995 [details]
org.eclipse.buckminster.pde-tp_features_build.patch

The attached patch deals with the most serious problem in this issue: an empty source feature being generated.
The patch makes sure the bogus feature is not generated.
Comment 3 Thomas Hallgren CLA 2011-01-26 16:37:26 EST
Patch applied to helios-maintenance, rev 11657.