[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 https://bugs.eclipse.org/bugs/show_bug.cgi?id=328508

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 https://bugs.eclipse.org/bugs/show_bug.cgi?id=319349

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

Fragment-Host: foo.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:

Fragment-Host: foo.host

In other words match any version of foo.host bundle. This clearly is not what the developer intended. It appears they wanted to resolve to only foo.host 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 foo.host. 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: foo.host; version="[1.0, 1.1)"
Fragment-Host: foo.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.