Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Changes coming in OSGi R4.3 to matching attributes on Require-Bundle and Fragment-Host

For Indigo M4 Equinox is implementing the new OSGi R4.3 core framework specification. One change that is coming (and has been released to this weeks I-Build of Equinox) is the ability to specify arbitrary matching attributes for the Require-Bundle and Fragment-Host manifest headers. See

In OSGi R4.2 the only supported matching attribute for Require-Bundle and Fragment-Host was the bundle-version attribute. In Equinox we ignored all other matching attributes that may have been specified. For example, see

In that bug there was a bundle that specified the following:

Fragment-Host:; version="[1.0,1.1)"

Notice the use of "version" instead of "bundle-version". Previous versions of Equinox would ignore the unknown "version" matching attribute making the header equivalent to:


In other words match any version of bundle. This clearly is not what the developer intended. It appears they wanted to resolve to only bundles that are in the bundle-version range of [1.0, 1.1), but we ignored this unknown "version" attribute and allowed the bundle to resolve to any version of But now with this weeks I-Build of Equinox the framework will start paying attention to all attributes specified on Require-Bundle and Fragment-Host manifest headers. So if you have something like the following:

Require-Bundle:; version="[1.0, 1.1)"
Fragment-Host:; version="[1.0, 1.1)"

Then that bundle will no longer be able to resolve. This because we now interpret all attributes specified as matching attributes just like the Import-Package and Export-Package headers do. So why am I telling you all this? Because we have several bundles in eclipse that have invalid Require-Bundle or Fragment-Host headers. See the following bugs:

All of these bundles need to be fixed. Their meta-data is incorrect and clearly is not doing what the developer intended. Previous versions of Equinox would allow the bundles to resolve but to any bundle-version available. Now we will completely fail to resolve these badly specified bundles because there will not be any bundles available that provide the "version" attribute on their Bundle-SymbolicName header.


Back to the top