John Ellinwood created KARAF-3627:
-------------------------------------
Summary: Add bundle revision information to bundle:list command
Key: KARAF-3627
URL: https://issues.apache.org/jira/browse/KARAF-3627
Project: Karaf
Issue Type: Improvement
Components: karaf-shell
Affects Versions: 3.0.3
Reporter: John Ellinwood
Priority: Critical
Fix For: 3.0.4
See [KARAF-3540] for why this might be useful.
There is room for enhancing the karaf bundle:list command. OSGi can have
multiple revisions of the same bundle, or cached versions of a bundle that was
uninstalled, but the bundle:list doesn't show them. The bundle:list command
could 1) have an option to list bundles that are pending removal / need to be
refreshed, and 2) list the full bundle URI including the bundle-revision id, or
classpath id, not just the bundle ID.
bundle revisions are different than versions.
For item 1)
to see which bundles need to be refreshed or have multiple revisions loaded
FrameworkWiring wiring =
getBundleContext().getBundle(0).adapt(FrameworkWiring.class);
Collection<Bundle> removal = wiring.getRemovalPendingBundles();
Collection<Bundle> deps = wiring.getDependencyClosure(removal);
For item 2)
see the bundleRevision interface in osgi
https://osgi.org/javadoc/r4v43/core/org/osgi/framework/wiring/BundleRevision.html
. like "321.2" would indicate bundle 321, revision 2. This way you can see
multiple revisions of the bundle are loaded.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)