[ 
https://issues.apache.org/jira/browse/FELIX-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840363#action_12840363
 ] 

Richard S. Hall commented on FELIX-1531:
----------------------------------------

I understand why Peter chose that approach too, but I just don't really like it 
due to these sorts of issues. However, your assumption about the new resolver 
approach is incorrect. One of the main goals for the new resolver (besides 
improving performance on some of the "worst case" scenarios) is to adopt the 
generic capability/requirement model of OBR. So, the new framework resolver 
relies on filters, not on parsed manifest headers. Where Peter chose to 
implement new operators in his filter impl, I chose to make my filter impl 
understand the mandatory directive. That's the difference.

For the current situation, I think your hack is the best we can do. In the long 
term, my goal is to use the new resolver for OBR, which would mean changing the 
way OBR deals with directives (i.e., they shouldn't be attributes named with 
":" but should be handled separately) and using my filter implementation.


> Mandatory directive is ignored on the Export-Package when it comes to resolve 
> the bundles
> -----------------------------------------------------------------------------------------
>
>                 Key: FELIX-1531
>                 URL: https://issues.apache.org/jira/browse/FELIX-1531
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.4.3
>         Environment: not applicable
>            Reporter: hehe ji
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to