[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.equinox] Problem with the dropins directory and the DynamicImport-Package directive

Test case :

1) install Eclipse 3.4.1
2) add the org.mozilla.xpcom plugin and feature from http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/eclipse/plugins/org.mozilla.xpcom_1.8.1.3-20080312.jar
http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/eclipse/features/org.mozilla.xpcom.feature_1.8.1.3-20080312.jar
to the dropins folder
3) start Eclipse


org.mozilla.xpcom is resolved correctly.

4) exit Eclipse
5) remove the org.mozilla.xpcom plugin and feature from the dropins folder
6) start Eclipse

org.mozilla.xpcom is removed from Eclipse

7) exit Eclipse
8) add org.mozilla.xpcom plugin and feature to the dropins directory again

org.mozilla.xpcom isn't resolved.

The problem is the following:

The manifest file in org.eclipse.swt contains the following directive:
DynamicImport-Package: org.mozilla.xpcom
P2 remembers this dependency in the profile file as follows:
...
<requires size='1'>
<required namespace='java.package' name='org.mozilla.xpcom' range='0.0.0' optional='true'/>
</requires>
...
When P2 solves installable units (SimplePlaner.getProvisioningPlan()), this dependency is treated as a bundle dependency. The problem exists within the sat4j solver (Projector.java).
The p2EncodingXXXX.opb file contains the following line:
* org.eclipse.swt 3.4.1.v3449c requires optionaly either org.mozilla.xpcom 1.8.1.3-20080312
According to this line, org.eclipse.swt depends on the org.mozilla.xpcom plugin which is not correct.
That's why org.mozilla.xpcom is removed from the bundles.info in step 6, but remains in the profile file.
When, in step 9, P2 adds org.mozilla.xpcom, the plugin isn't added to bundles.info because it exists in the profile file(ProfileSynchronizer.createProfileChangeRequest()).


The org.mozilla.xpcom plugin won't be resolved unless it is added to bundles.info manually or the p2 directory is recreated.

If you rename the plugin (to org.mozilla.xpcom2, for instance), the problem won't exist.

The same problem is in Eclipse 3.5M4.

Snjeza