Thank you very much for your answer Peter. I'm not experienced enough with OSGi
to fully understand why despite being all needed packages correctly exported,
may be a problem resolving a given bundle (assuming it has only
specific packages as requirements).
I will follow your advice and investigate how can I integrate OBR to my
solution.
Thanks again!
>________________________________
> De: Peter Kriens <peter.kri...@aqute.biz>
>Para: Matias SM <elmismocorreo-o...@yahoo.com.ar>; OSGi Developer Mail List
><osgi-dev@mail.osgi.org>
>Enviado: lunes, 12 de diciembre de 2011 6:40
>Asunto: Re: [osgi-dev] Retrieve bundle's missing dependencies
>
>
>The cause of your confusion why there is no simple way to find the missing
>dependencies is that it is much harder to answer that question than you seem
>to think :-)
>
>
>Resolving OSGi bundles is a constraint solving problem and there are many
>paths that lead to a solution. Version changes and contract based dependencies
>allow a resolve to traverse different paths. If you cannot find a solution
>then there is not always a clear list of missing requirements.
>
>
>The Apache Felix Webconsole is just applying some heuristics and the
>standardized access through headers to provide hints. However, there are cases
>where even if all requirements are met you still cannot resolve.
>
>
>The upcoming OBR specification will make it easier to handle these issues and
>if I were you I would focus on OBR.
>
>
>Kind regards,
>
>
>Peter Kriens
>
>
>
>
>
>
>
>
>
>
>On 10 dec. 2011, at 00:51, Matias SM wrote:
>
>I've reading the OSGi Service Platform Core Specification (Release 4, Version
>4.3) and I can't find anything about how to get a bundle's unsatisfied package
>imports. The only thing I found about retrieving a bundle's related package
>information is the wiring API, but (as stated in the spec) it is only for
>resolved bundles.
>>Maybe I'm reading the wrong part of the spec (also couldn't find anything by
>>googling it). I would like to know more about how to get the unsatisfied
>>package imports (given an installed bundle) because in the framework I'm
>>working on, I have some information that may be useful to find the missing
>>dependencies (so avoiding the need to depend on something as powerful as OBR
>>that would be an overkill).
>>
>>
>>I will be very grateful for any guidance related to this issue.
>>Regards
>>
>>
>>
>>
>>>________________________________
>>> De: Matias SM <elmismocorreo-o...@yahoo.com.ar>
>>>Para: Neil Bartlett <njbartl...@gmail.com>; OSGi Developer Mail List
>>><osgi-dev@mail.osgi.org>
>>>Enviado: jueves, 1 de diciembre de 2011 13:56
>>>Asunto: Re: [osgi-dev] Re: Retrieve bundle's missing dependencies
>>>
>>>
>>>Many thanks Neil for your answer!
>>>
>>>
>>>I will pay a look at OBR as you recommend. Also, you told me that "the core
>>>can tell you about unsatisfied package imports", may I ask how can I
>>>accomplish that?
>>>
>>>
>>>
>>>
>>>>________________________________
>>>> De: Neil Bartlett <njbartl...@gmail.com>
>>>>Para: Matias SM <elmismocorreo-o...@yahoo.com.ar>; OSGi Developer Mail List
>>>><osgi-dev@mail.osgi.org>
>>>>Enviado: miércoles, 30 de noviembre de 2011 22:03
>>>>Asunto: Re: [osgi-dev] Re: Retrieve bundle's missing dependencies
>>>>
>>>>Hello Matias,
>>>>
>>>>My apologies, somebody should have tried to answer this question much
>>>>earlier.
>>>>
>>>>Blueprint does not do anything like this. You may want to use it for
>>>>other things, but it's irrelevant for the problem you describe. Nor is
>>>>there really anything in core OSGi... the core can tell you about
>>>>unsatisfied package imports, but you would need a mapping that tells
>>>>you which bundles are available that export those packages and where
>>>>they are.
>>>>
>>>>What you really need is a resolver technology that you can query for a
>>>>complete set of bundles that fulfil your requirement. The technology
>>>>you should be looking at is OBR; there is an implementation in Apache
>>>>Felix (it runs on all the other
frameworks also). See the following
>>>>document:
>>>>
>>>> http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html
>>>>
>>>>Note that OBR is currently being standardised by the OSGi Alliance,
>>>>and there is a public preview available of the new OBR specification
>>>>(RFC 112). However until that specification is released, the OBR
>>>>implementation in Felix is IMHO the best available solution for what
>>>>you want.
>>>>
>>>>For completeness I should mention that p2 from Equinox/Eclipse can
>>>>also help with the same kind of problem. However you appear to be
>>>>quite concerned about being lightweight and minimising dependencies --
>>>>a commendable attitude!-- and unfortunately p2 is a much heavier
>>>>dependency than OBR.
>>>>
>>>>Regards,
>>>>Neil
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>On Thu, Dec 1, 2011 at 12:45 AM, Matias SM
>>>><elmismocorreo-o...@yahoo.com.ar> wrote:
>>>>> Anybody has some insight to share about this? Even a RTFM is greatly
>>>>> welcome
>>>>> if I'm told which F. Manual should I read.
>>>>>
>>>>> Maybe there is a better way to do what I need. What I need to do is to
>>>>> "download" the necessaries bundles (dependencies) to resolve a given
>>>>> bundle.
>>>>> My use case is as follows:
>>>>> - I receive a bundle from a stream (network connection)
>>>>> - I need to activate the bundle in the current framework
>>>>> - The received bundle may have some missing dependencies, so I need to
>>>>> find
>>>>> them (here is where my question rise, if I had the name of the "missing"
>>>>> bundles, I might be able to find them).
>>>>>
>>>>> I'm trying to keep the framework that uses this mechanism as light as
>>>>> possible, that
is why I would prefer not to
add blueprint as a new
>>>>> requirement.
>>>>>
>>>>> Many thanks in advance for any help you can give me.
>>>>> Regards
>>>>>
>>>>> ________________________________
>>>>> De: "elmismocorreo-o...@yahoo.com.ar" <elmismocorreo-o...@yahoo.com.ar>
>>>>> Para: "osgi-dev@mail.osgi.org" <osgi-dev@mail.osgi.org>
>>>>> Enviado: miércoles, 9 de noviembre de 2011 18:52
>>>>> Asunto: Retrieve bundle's missing dependencies
>>>>>
>>>>> Hi
everybody, I'm _really new_ with OSGi so forgive me if my question is
>>>>> basic or vague.
>>>>> I was looking for a way of
getting a bundle's missing dependencies (that
>>>>> keep it installed and not resolved). I did some googling and found that
>>>>> (apparently) it can be done using blueprint [1]. However, I was wondering
>>>>> if
>>>>> it can be done using only OSGi's core.
>>>>> Any piece of advice is very welcome.
>>>>> Regards
>>>>>
>>>>> [1]
>>>>> http://www.osgi.org/javadoc/r4v42/org/osgi/service/blueprint/container/BlueprintEvent.html
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> OSGi Developer Mail List
>>>>> osgi-dev@mail.osgi.org
>>>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>>>
>>>>
>>>>
>>>_______________________________________________
>>>OSGi Developer Mail List
>>>osgi-dev@mail.osgi.org
>>>https://mail.osgi.org/mailman/listinfo/osgi-dev
>>>
>>>_______________________________________________
>>OSGi Developer Mail List
>>osgi-dev@mail.osgi.org
>>https://mail.osgi.org/mailman/listinfo/osgi-dev
>
>
>
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev