Bug 406220 - CSPEC generation for bundles should not include product exports residing in a required bundle
Summary: CSPEC generation for bundles should not include product exports residing in a...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-22 10:21 EDT by Tobias Bertelsen CLA
Modified: 2019-02-25 14:41 EST (History)
0 users

See Also:


Attachments
Patch with a fix (1.23 KB, application/octet-stream)
2013-04-22 10:21 EDT, Tobias Bertelsen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Bertelsen CLA 2013-04-22 10:21:18 EDT
Created attachment 229964 [details]
Patch with a fix

When generating the CSPEC for a bundle the group product.configurations.export contains references to all product.configurations.export attributes in its dependencies.
This is a problem when generating p2-sites, since products can be present with invalid metadata in a p2-site which shouldn't contain them.

The code concerning this problem is in org.eclipse.buckminster.pde.cspecgen.bundle.CSpecFromSource#addImports() (L. 676).
A fix is attached. 


***********
Steps to reproduce:
*Create two Plugins, A and B.
**Plugin A depends on plugin B.
**Plugin B contains a product description, which uses the simpleconfigurator (which changes the config.ini).
*Create two features F and G.
**F includes only A.
**G includes B and org.eclipse.rcp (the feature with rcp essentials, including simpleconfigurator)
*Create two p2-sites using Buckminster P and Q.
**Site Q contains G, i.e. B and the rcp feature.
**Site Q also contians metadata for the product as expected
**Site P contains F, i.e. only A.
**Site P also contains metadata for the product, but the meta data is invalid, since e.g. the simpleconfigurator configuration is missing.
*Call the p2 director and pointing it to both P and R (i.e. -repository url/to/P,url/to/R ). The p2 director will then nondeterministicly choose the product metadata from either P or R, resulting in a corrupted build half the time.


***********
Workaround:
Put your product description files in a feature or bundle, which isn't referenced by any component which should be in an other p2-repository.


***********
See:
This forum thread:
http://www.eclipse.org/forums/index.php/t/479116/