Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3627

Add bundle revision information to bundle:list command

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 3.0.3
    • 3.0.4, 4.0.0.M3
    • karaf

    Description

      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.

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            dosgiuser John Ellinwood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified