Ticket #335 (new defect)

Opened 3 months ago

Last modified 3 months ago

GHC_PACKAGE_PATH disrespected

Reported by: cjs Assigned to:
Priority: high Milestone:
Component: Cabal library Version: 1.2.3.0
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.8.3 Platform: Other Unix

Description

Looks like cabal doesn't even use GHC_PACKAGE_PATH at all.

$ unset GHC_PACKAGE_PATH
$ ghc-pkg list binary
/usr/pkg/lib/ghc-6.8.3/package.conf:
$ export GHC_PACKAGE_PATH=/my/package.conf:/usr/pkg/lib/ghc-6.8.3/package.conf
$ ghc-pkg list binary
/usr/pkg/lib/ghc-6.8.3/package.conf:
/my/package.conf:
    binary-0.4.1
$ runghc Setup.hs configure
Configuring mypackage-1.0...
Setup.hs: At least the following dependencies are missing:
    binary -any

Change History

08/21/08 02:25:25 changed by duncan

Cabal supports the --package-db=db flag.

Currently it does not support specifying multiple dbs using --package-db, or using the normal per-user db and a specific one, but it probably should.

08/21/08 02:46:14 changed by cjs

After some discussion, I'm in agreement with dcoutts that this environment variable should be ignored, possibly with a warning. This is because it's more or less "hidden"; it's not visible on a command line, and thus will often be forgotten when reporting bugs, it's ghc-specific anyway, and so on. I think it should be a wontfix.

08/21/08 06:40:21 changed by duncan

Simon suggested that perhaps the most user friendly solution for the few users of this env var is to fail at configure if GHC_PACKAGE_PATH is set and to tell users about the --package-db= flag.