[
https://issues.apache.org/jira/browse/KARAF-3540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14376007#comment-14376007
]
John Ellinwood edited comment on KARAF-3540 at 3/23/15 3:07 PM:
----------------------------------------------------------------
Moved this to [KARAF-3627]
--old--
I know this is closed, but there might be an option for enhancing the karaf
bundle:list command here. The bundle cache issue isn't just on uninstalled
bundles... you could also have updated a bundle several times and potentially
had intermediate wirings to it causing multiple versions to be cached for a
single bundle. The bundle:list command could 1) have an option to list bundles
that are pending removal, and 2) list the full bundle URI including the
bundle-revision id, or classpath id, not just the bundle ID.
For item 1)
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 versions of the bundle are loaded.
was (Author: dosgiuser):
I know this is closed, but there might be an option for enhancing the karaf
bundle:list command here. The bundle cache issue isn't just on uninstalled
bundles... you could also have updated a bundle several times and potentially
had intermediate wirings to it causing multiple versions to be cached for a
single bundle. The bundle:list command could 1) have an option to list bundles
that are pending removal, and 2) list the full bundle URI including the
bundle-revision id, or classpath id, not just the bundle ID.
For item 1)
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 versions of the bundle are loaded.
> Bundle package conflicts with uninstalled bundles
> -------------------------------------------------
>
> Key: KARAF-3540
> URL: https://issues.apache.org/jira/browse/KARAF-3540
> Project: Karaf
> Issue Type: Bug
> Components: karaf-osgi
> Reporter: Sergey
>
> Karaf 3.0.3 reports about package conflicts for spring framework packages.
> One of conflicting bundles is spring version 3.x, another one - 4.x.
> Conflict exists even if I've ininstalled all spring 4.x bundles.
> Conflicted spring 4.x bundles at the moment exists only in data/cache, not in
> bundle:list command output.
> I can resolve this issue only after karaf restart.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)