Community
Participate
Working Groups
Equinox appears to allow "version" as a synonym for "bundle-version" on Fragment-Host. Someone coded "version" into a bundle in the SpringSource Enterprise Bundle Repository and only now, when someone is trying to run this bundle on Felix, have we found out that the bundle is broken. See https://issues.apache.org/jira/browse/FELIX-2466 for background. Equinox should tighten up its default behaviour to conform closely with the OSGi spec for Fragment-Host unless the OSGi spec can be relaxed.
This is not a bug in Equinox, instead it is a bug in Felix. Equinox is complying with the specification. I discussed this with Richard Hall and he agrees. See his comments in https://issues.apache.org/jira/browse/FELIX-2466. The "version" attribute is not a recognized attribute for the Fragment-Host header. The following two Fragment-Host headers are equivalent according to the specification: Fragment-Host: foo.host; version="[1.0,1.1)" Fragment-Host: foo.host In the first case "version" is not a recognized matching attribute. Arbitrary matching attributes are only supported on Import-Package/Export-Package. The specification also states that unrecognized attributes/directives should be ignored by the framework. So in this case Equinox simply ignores the version attribute. This means the fragment will be able to attach to any version of the host foo.host. In retrospect, I am not sure why the OSGi specification decided to use the "bundle-version" attribute for Require-Bundle and Fragment-Host instead of simply "version".
Hi Tom Re-reading Richard's comments I now understand and agree this is not a bug in Equinox. Sorry to have troubled you. Glyn
(In reply to comment #2) > Hi Tom > > Re-reading Richard's comments I now understand and agree this is not a bug in > Equinox. Sorry to have troubled you. > > Glyn No problem Glyn. I am not sure what tooling you use to create your manifests. If it is PDE, then an argument could be made that PDE should flag this as a warning/error. If that is the case you could consider reopening this bug and moving it to PDE->UI.