Opened 4 years ago

Last modified 4 weeks ago

#6119 new feature request

complain when ghc-pkg doesn't find any matching packages in a given database

Reported by: dmwit Owned by:
Priority: normal Milestone:
Component: ghc-pkg Version: 7.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #10785 Differential Rev(s):
Wiki Page:


Currently, ghc-pkg list will print something like the following when no package matches a query:

$ ghc-pkg list blargle

This is a deceptive answer for newcomers, because they assume that this means the package was successfully found, and lives in /usr/local/lib/ghc-7.4.1/package.conf.d. It would be nice if the message explicitly mentioned that the result list was actually empty; for example:

$ ghc-pkg list blargle
    (no matching packages found in this database)

Change History (4)

comment:1 Changed 3 years ago by ian@…

commit 55478b1ef856d47fba7e7dbd86baa88030d1b1cf

Author: Ian Lynagh <[email protected]>
Date:   Thu Oct 11 21:31:00 2012 +0100

    ghc-pkg: Print something when no packages are found; fixes #6119
    We used to say
        $ ghc-pkg list blargle
    which may imply that blargle was found in

 utils/ghc-pkg/Main.hs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

comment:2 Changed 3 years ago by igloo

  • difficulty set to Unknown
  • Resolution set to fixed
  • Status changed from new to closed

Fixed, thanks

comment:3 Changed 4 weeks ago by dmwit

  • Resolution fixed deleted
  • Status changed from closed to new

GHC has since grown a colored version of ghc-pkg, which did not inherit this nice feature.

comment:4 Changed 4 weeks ago by thomie

  • Component changed from Compiler to ghc-pkg
Note: See TracTickets for help on using tickets.