Ticket #770 (new defect)

Opened 2 years ago

Last modified 2 years ago

cabal is not reading or respecting ~/.cabal/config

Reported by: guest Owned by:
Priority: normal Milestone:
Component: Cabal library Version: 1.8.0.6
Severity: minor Keywords: cabal config global directories
Cc: Difficulty: unknown
GHC Version: 6.12.3 Platform: Linux

Description

I changed my ~/.cabal/config file to keep global packages under /usr/local/lib/haskell and /usr/local/share/haskell to avoid cluttering the main /usr/local/lib and /usr/local/share/doc directories. ghc-pkg finds them just fine, and ghc-pkg recache works as expected. However, when I do 'cabal install whatever --global' it still throws everything into the old default directories, and more distressingly it isn't updating the access timestamp on ~/.cabal/config (as revealed by ls -u.)

cabal --version reports 0.8.2 using library 1.8.0.6, nothing else unusual about my setup.

Change History

Changed 2 years ago by duncan

This is quite peculiar. I assume it is something odd in your particular setup or situation, since cabal definitely does read its config file (or very little would work for anyone).

Double check a few things:

  • that your ~/.cabal/config file is readable.
  • are access timestamps on your system accurate? (may systems are configured with the noatime mount option). If you're sure it's not reading it at all, check with strace.

Attaching your ~/.cabal/config to this ticket might give us more clues.

Note: See TracTickets for help on using tickets.