Re: Show reverse depends of a bundle on console

2023-08-23 Thread Paul Spencer
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é  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  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
>> 



Re: Show reverse depends of a bundle on console

2023-08-21 Thread Jean-Baptiste Onofré
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  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
>


Re: Show reverse depends of a bundle on console

2023-08-15 Thread Anthony Wood
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



Re: Show reverse depends of a bundle on console

2023-08-11 Thread Paul Spencer
Anthony
"imports -i" may be what you are looking for.


karaf@root()> imports --help
DESCRIPTION
package:imports

Lists imported packages and the bundles that import them

SYNTAX
package:imports [options]

OPTIONS
--help
Display this help message
-b
Only show imports of the given bundle id
--show-name-only
Show only package name
--filter
Only show package instead of full filter
-p
Only show package starting with given name
--no-format
Disable table rendered output

karaf@root()>

Paul Spencer


  

> On Aug 11, 2023, at 12:23 PM, Anthony Wood  wrote:
> 
> In karaf 2.x, I would often use ‘exports -i $id’ to show the “reverse 
> dependencies” of the bundle, i.e., what other bundles are wired to it by 
> imports.
> 
> I cannot find the equivalent in karat 4.4. Has this functionality been lost?
> 
> Thanks,
> Anthony



Show reverse depends of a bundle on console

2023-08-11 Thread Anthony Wood
In karaf 2.x, I would often use ‘exports -i $id’ to show the “reverse 
dependencies” of the bundle, i.e., what other bundles are wired to it by 
imports.

I cannot find the equivalent in karat 4.4. Has this functionality been lost?

Thanks,
Anthony