Karaf
  1. Karaf
  2. KARAF-1749

The command packages:imports should work on unresolved bundles

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.8
    • Fix Version/s: 2.2.10, 2.3.0
    • Component/s: karaf-shell
    • Labels:
      None

      Description

      Currently the packages:imports command only works on resolved/active bundles.
      If the bundle has missing constraints and is in installed state it just prints out:
      karaf@root> packages:imports 140
      <bundlename> (140): No active imported packages.

      It would be better if it:
      a) say that the command does not work on installed state
      or even better
      b) print out what packages are not resolving.

      The information might be obtained from the osgi:headers command, but this is an additional step to take and not very intuitive.

        Activity

        Christoph Läubrich created issue -
        Hide
        Freeman Fang added a comment -

        Hi,

        a) is doable but b) isn't.
        The goal of packages:imports is for printing the actual import package for a resolved bundle, the info is from PackageAdmin service, and it's more dynamic, you can consider it as a snapshot during runtime.

        The osgi:headers print out the metadata OSGi header, the info is from the bundle's MENIFEST.MF(well it'll use PackageAdmin when determine if the optional import package is satisfied), it's more static.
        Those are different command used for different ways.

        Freeman

        Show
        Freeman Fang added a comment - Hi, a) is doable but b) isn't. The goal of packages:imports is for printing the actual import package for a resolved bundle, the info is from PackageAdmin service, and it's more dynamic, you can consider it as a snapshot during runtime. The osgi:headers print out the metadata OSGi header, the info is from the bundle's MENIFEST.MF(well it'll use PackageAdmin when determine if the optional import package is satisfied), it's more static. Those are different command used for different ways. Freeman
        Freeman Fang made changes -
        Field Original Value New Value
        Assignee Freeman Fang [ ffang ]
        Hide
        Andreas Pieber added a comment -

        I second Freeman on that one; I think something like: "This command only works on started bundles, use bundle:header instead" (or something like this) would be quite nice

        Show
        Andreas Pieber added a comment - I second Freeman on that one; I think something like: "This command only works on started bundles, use bundle:header instead" (or something like this) would be quite nice
        Freeman Fang made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Freeman Fang added a comment -
        Show
        Freeman Fang added a comment - commit fix http://svn.apache.org/viewvc?rev=1375877&view=rev for 2.3.x branch http://svn.apache.org/viewvc?rev=1375875&view=rev for 2.2.x branch
        Freeman Fang made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 2.2.10 [ 12322541 ]
        Fix Version/s 2.3.0 [ 12320554 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        17h 20m 1 Freeman Fang 22/Aug/12 01:09
        In Progress In Progress Resolved Resolved
        1h 4m 1 Freeman Fang 22/Aug/12 02:14

          People

          • Assignee:
            Freeman Fang
            Reporter:
            Christoph Läubrich
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development