Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317263 - Unwanted bundles included in site.p2 and product
Summary: Unwanted bundles included in site.p2 and product
Status: VERIFIED 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: Thomas Hallgren CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-18 00:41 EDT by Peter Nehrer CLA
Modified: 2019-02-25 14:40 EST (History)
1 user (show)

See Also:


Attachments
Example projects that demonstrate the problem (6.55 KB, application/octet-stream)
2010-06-18 00:42 EDT, Peter Nehrer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Nehrer CLA 2010-06-18 00:41:18 EDT
Under some circumstances, Buckminster adds unrelated bundles to site.p2 and generated product configurations.

To help demonstrate the problem I contrived an example setup that resembles the Buckminster Mail App example; however, instead of one product I have two, and one of them only depends on a handful of Equinox bundles (not org.eclipse.core.runtime, for example), while the other includes org.eclipse.core.runtime and other related bundles.

The target platform is provisioned from Helios and includes the full Equinox SDK.

When I generate site.p2 from the site feature, the "simple" product ends up with org.eclipse.core.runtime, org.eclipse.core.jobs, and org.eclipse.core.contenttype, which are not required by this product (and in fact cause problems by being included there). Furthermore, site.p2 contains bundles that are simply not referenced by any of the features (e.g., extension fragments that happen to be in the target platform).

When I generate site.p2 from the "simple" product feature alone, it turns out as expected.

E.g.,
diff -w /tmp/buckminster-examples/simple/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info /tmp/buckminster-examples/simple-from-site/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info 
5a6,9
> org.eclipse.core.contenttype,3.4.100.v20100505-1235,plugins/org.eclipse.core.contenttype_3.4.100.v20100505-1235.jar,4,false
> org.eclipse.core.jobs,3.5.0.v20100515,plugins/org.eclipse.core.jobs_3.5.0.v20100515.jar,4,false
> org.eclipse.core.runtime,3.6.0.v20100505,plugins/org.eclipse.core.runtime_3.6.0.v20100505.jar,4,true
> org.eclipse.equinox.app,1.3.0.v20100512,plugins/org.eclipse.equinox.app_1.3.0.v20100512.jar,4,false
6a11
> org.eclipse.equinox.common,3.6.0.v20100503,plugins/org.eclipse.equinox.common_3.6.0.v20100503.jar,2,true
11a17,18
> org.eclipse.equinox.preferences,3.3.0.v20100503,plugins/org.eclipse.equinox.preferences_3.3.0.v20100503.jar,4,false
> org.eclipse.equinox.registry,3.5.0.v20100503,plugins/org.eclipse.equinox.registry_3.5.0.v20100503.jar,4,false

There is no difference in configurations for the "full" product -- one that includes those other bundles in the first place.

I'm attaching the workspace archive as well as a build directory archive, where I also installed the products from the various site.p2 directories. E.g.,

simple -> installed from output/ca.ecliptical.buckminster.examples.equinox.simple_1.0.0-eclipse.feature/site.p2
simple-from-site -> installed from output/ca.ecliptical.buckminster.examples.equinox.site_1.0.0-eclipse.feature/site.p2
full -> installed from output/ca.ecliptical.buckminster.examples.equinox.full_1.0.0-eclipse.feature/site.p2
full-from-site -> installed from output/ca.ecliptical.buckminster.examples.equinox.site_1.0.0-eclipse.feature/site.p2
Comment 1 Peter Nehrer CLA 2010-06-18 00:42:42 EDT
Created attachment 172185 [details]
Example projects that demonstrate the problem
Comment 2 Peter Nehrer CLA 2010-06-18 00:46:17 EDT
Due to the large size of the build directory archive, I'm not attaching it here. It can be downloaded from http://www.eclipticalsoftware.com/buckminster-examples-build.zip.
Comment 3 Thomas Hallgren CLA 2010-06-20 15:38:46 EDT
The problem stems from the way Buckminster sets the default start levels. A list of bundles is maintained for this. In order to set a start level, the bundle must be included at the top IU for the product so Buckminster checks if the bundle is present in the site that is built, and if it is, it's assumed that the product IU should include it. The attached sample is one case where this assumption leads to incorrect results. In order to rectify this, Buckminster should check against the transitive scope extending from the product. If the bundle isn't there, it should never be included.
Comment 4 Thomas Hallgren CLA 2010-06-21 14:47:57 EDT
Fix checked in to helios-maintenance branch, rev 11475.
Comment 5 Peter Nehrer CLA 2010-07-21 16:06:33 EDT
Verified -- awesome, thanks.