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

Stefan Bischof edited comment on FELIX-5973 at 10/26/18 3:27 PM:
-----------------------------------------------------------------

sorry for the bad description and thank you for the description.

 

in the resolveresult is the bundle *ds.resolve.capfora* but not *ds.resolve.a* 

This is incorrect. *ds.resolve.capfora* is *only* required from  *ds.resolve.a 
.*  But *ds.resolve.a* is not in the Result.  

 
{code:java}
Result
ds.resolve.b
ds.resolve.cap
ds.resolve.capfora
ds.resolve.req
org.apache.felix.scr
{code}
 


was (Author: bisch...@jena.de):
sorry for the bad description.

 

in the resolveresult is the bundle *ds.resolve.capfora*

This is incorrect. *ds.resolve.capfora* is *only* required from  *ds.resolve.a 
.*  But *ds.resolve.a* is not in the Result.

 

 
{code:java}
Result
ds.resolve.b
ds.resolve.cap
ds.resolve.capfora
ds.resolve.req
org.apache.felix.scr
{code}
 

> fix resolving issues
> --------------------
>
>                 Key: FELIX-5973
>                 URL: https://issues.apache.org/jira/browse/FELIX-5973
>             Project: Felix
>          Issue Type: Bug
>          Components: Resolver
>            Reporter: Stefan Bischof
>            Priority: Major
>
>  
> *Description*
> 1. Felix tries to resolve other bundles, even when the bundle has the 
> capability for the requirement by its own
> 2. Felix resolves bundles, which are only required by bundles that aren't in 
> the resolve result
>  
>  *Example:* [https://github.com/stbischof/ds.resolve]
>  
> try to resolve {{bundle req}}
>  * {{bundle req}} has the requirement {{namespace="ns",name="name"}}
> so we look for the same capability {{namespace="ns",name="name"}}
>  * bundle cap has the capability {{namespace="ns",name="name"}}
>  * but {{bundle cap}} has also a Requirement 
> {{osgi.service;filter:="(objectClass=java.lang.Readable)";effective:=active;cardinality:=multiple}}.
>  * this could be providet by itsselve 
> {{osgi.service;objectClass:List<String>="java.lang.Readable"}} (target 
> property of @Reference is not processed)
> h3. Issues:
>  * it resolves {{bundle capfora}} which provides a capability that is 
> required by {{bundle a}} -> provides also the capability that is required 
> from {{bundle cap}} ( 
> {{osgi.service;objectClass:List<String>="java.lang.Readable"}}).
>  * But in this case {{bundle a}} is not in the resolveresult
>  * bundle b is also resolved. (not needet, cap has the needet capability by 
> its own)
>  
> *Reproduce:*
> h3. bndtools/eclipse
> push the resolve button at ds.resolve/resolveActive.bndrun
> h3. commands
>  
> {code:java}
> git clone https://github.com/stbischof/ds.resolve.git
> cd ds.resolve
> java -jar biz.aQute.bnd-4.1.0.jar clean
> java -jar biz.aQute.bnd-4.1.0.jar _par
> java -jar biz.aQute.bnd-4.1.0.jar resolve resolve --write 
> ds.resolve/resolveActive.bndrun
> git diff
> {code}
>  
>  
> results:
> {{+-runbundles: \ + ds.resolve.b;version=snapshot,\ + 
> ds.resolve.cap;version=snapshot,\ + ds.resolve.capfora;version=snapshot,\ + 
> ds.resolve.req;version=snapshot,\ + 
> org.apache.felix.scr;version='[2.1.0,2.1.1)'}}
> h2.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to