[Hackage] #543: ghc global package db should live in /var not /usr

Hackage cvs-ghc at haskell.org
Fri Jun 24 20:53:06 CEST 2011

#543: ghc global package db should live in /var not /usr
  Reporter:  nr             |        Owner:         
      Type:  defect         |       Status:  new    
  Priority:  normal         |    Milestone:         
 Component:  Cabal library  |      Version:
  Severity:  normal         |     Keywords:         
Difficulty:  unknown        |   Ghcversion:  6.8.2  
  Platform:  Linux          |  

Comment(by Syzygies):

 The real problem is accepting the dubious, ancient custom of scattering an
 installation across multiple bin, lib, share, doc directories rather than
 localizing everything in say /usr/local/ghc-7.0.4a. Giving the installing
 user write permission for this directory avoids the need for root
 permissions, and can insure that the install actually takes place
 exclusively within this directory.

 I'm baffled how others do side-by-side installs of different versions of
 GHC without following such a scheme. I'm opposed to this /var proposal.
 The convention of spraying files across hell and high water is what's
 broken, and we should do nothing to make matters worse. Adding /var to the
 spray list would be making matters worse.

 A number of modern projects similar to GHC default to localized installs
 in the style of /usr/local/ghc-7.0.4a; we should do the same. GHC is
 important enough to warrant a separate PATH entry, or aliases in

 "This is one reason we do per-user installs by default."

 Cabal should check for a global config file parallel to `which ghc`
 according to the current path, defaulting to global installs and ignoring
 ~/.cabal/config if possible. The existence of ~/.cabal/config is like a
 global variable, and interferes with multiple side-by-side installations
 of GHC.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/543#comment:3>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list