Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-1531

Mandatory directive is ignored on the Export-Package when it comes to resolve the bundles

    XMLWordPrintableJSON

Details

    Description

      When I try to resolve a bundle (bundleFooImport.jar) with the following manifest:
      Import-Package: a.b.c;company=foo

      In the bundle repository, I have a bundle (bundleFoo.jar) with the following manifest:
      Export-Package:a.b.c;version=3;company=foo;security=true;mandatory:="company,security"

      The repository.xml for the bundleFoo.jar

      <capability name='package'>
      <p n='company' v='foo'/>
      <p n='mandatory:' t='set' v='company,security'/>
      <p n='package' v='a.b.c'/>
      <p n='security' v='true'/>
      <p n='version' t='version' v='3.0.0'/>
      </capability>

      For some reason, the felix resolve resolves the bundleFooImport.jar with bundle bundleFoo.jar, which is wrong. According to the osgi specification, bundleFoo.jar bundle insists the bundle imports specifying company and security attributes, which was not the case of bundleFooImport.jar. Clearly, the felix implementation of the mandatory directive is NOT correct.

      Please let me know if you need any more details.
      Thanks
      Hehe

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            hehe Emily Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: