Ticket #623 (closed enhancement: fixed)

Opened 3 years ago

Last modified 14 months ago

when a package is already installed, print the version as well

Reported by: guest Owned by:
Priority: normal Milestone: cabal-install-0.14
Component: cabal-install tool Version: 1.6.0.1
Severity: normal Keywords:
Cc: Difficulty: very easy (<1 hour)
GHC Version: Platform:

Description

At the moment, when a package is already installed, cabal-install prints a message like the following:

> cabal install 'HaXml>1.3'
Resolving dependencies...
No packages to be installed. All the requested packages are already installed.
If you want to reinstall anyway then use the --reinstall flag.

It would be helpful to print the version(s) of the requested package(s) as well.

One case where this would be useful is to help the user realise that a preferred-version entry is in effect - in the case above, the version of HaXml selected would be 1.13.3, while the latest version on hackage is 1.20.

The output could look like this:

> cabal install 'HaXml>1.3'
Resolving dependencies...
No packages to be installed. All the requested packages are already installed, in particular:
HaXml-1.13.3
If you want to reinstall anyway then use the --reinstall flag.

Change History

Changed 3 years ago by guest

Duncan and I (int-e) agree that the warning should only be displayed when cabal install does nothing at all.

Changed 3 years ago by duncan

  • difficulty changed from unknown to very easy (<1 hour)
  • milestone set to cabal-install-0.8

Changed 15 months ago by kosmikus

  • milestone changed from cabal-install-0.8 to cabal-install-0.14

Changed 14 months ago by kosmikus

  • status changed from new to closed
  • resolution set to fixed

The message is:

$ cabal install multirec
Resolving dependencies...
All the requested packages are already installed:
multirec-0.7.1
Use --reinstall if you want to reinstall anyway.

The patch is:

Sat Apr  7 11:28:29 CEST 2012  Andres Loeh <andres@well-typed.com>
  * for empty install plans, print the packages that are installed
  
  This is a fix for #623.
  
  If we ask to install a package without --reinstall that's already
  there, then we'll show the package and its version in the warning
  message and suggest the use of the --reinstall flag.

Hopefully done, closing.

Note: See TracTickets for help on using tickets.