Antony,
Does the package:imports command not provide the needed information?

karaf@internal()> package:imports -p javax.xml.xpath
Package         │ Version │ Optional │ ID  │ Bundle Name
────────────────┼─────────┼──────────┼─────┼───────────────────────────────────────────
javax.xml.xpath │         │          │ 147 │ org.apache.commons.commons-text
javax.xml.xpath │         │          │ 51  │ org.ops4j.pax.url.wrap
javax.xml.xpath │         │          │ 74  │ org.apache.cxf.cxf-core
javax.xml.xpath │         │          │ 75  │ 
org.apache.cxf.cxf-rt-frontend-jaxrs
javax.xml.xpath │         │          │ 94  │ 
org.apache.servicemix.bundles.jaxb-runtime
javax.xml.xpath │         │          │ 95  │ 
org.apache.servicemix.bundles.jaxb-xjc
karaf@internal()> package:exports -p javax.xml.xpath
Package Name    │ Version │ ID │ Bundle Name
────────────────┼─────────┼────┼───────────────────────────
javax.xml.xpath │ 0.0.0   │ 0  │ org.apache.felix.framework
karaf@internal()> package --help
SUBSHELL
        package

COMMANDS
    package:exports Lists exported packages and the bundles that export them
    package:imports Lists imported packages and the bundles that import them
karaf@internal()>                                                               
                                                            


Paul Spencer

> On Aug 22, 2023, at 1:00 AM, Jean-Baptiste Onofré <[email protected]> wrote:
> 
> Hi,
> 
> It sounds like a change in exports command between Karaf 2 & 3.
> 
> Can you please create a ticket ? I will re-add the option on the shell
> command (and probably corresponding MBean).
> 
> Thanks !
> Regards
> JB
> 
> On Tue, Aug 15, 2023 at 9:44 PM Anthony Wood <[email protected]> wrote:
>> 
>> Hi Paul,
>> 
>> I am looking for a way to find which bundles are importing packages from a 
>> *given* bundle.
>> 
>> In karaf 2.x, if I have a bundle dependency network in which both bundles 1 
>> and 2 import a package exported from bundle 3, this command shows me exactly 
>> which bundles depend on 3 (i.e., 1 and 2):
>> 
>> karaf> exports -i 3
>> ID Packages                   Imported by
>> 3  org.foo.bar; version=1.0   Bundle One (1)
>> 3  org.foo.baz; version=1.0   Bundle Two (2)
>> 
>> In karaf 4.x, so far I cannot duplicate this.  The best I have found is to 
>> use “tree-show” on every bundle and search/grep for the bundle 3 that I care 
>> about.  The “imports” command only shows me the packages, not the bundles 
>> satisfying them.  I am open to suggestions for recovering the functionality 
>> loss.
>> 
>> Thanks,
>> Anthony
>> 

Reply via email to