
#1612: GHC_PACKAGE_PATH and $topdir bug -------------------------------------+------------------------------------- Reporter: eivuokko | Owner: Type: bug | Status: new Priority: lowest | Milestone: ⊥ Component: Package system | Version: 6.6.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * os: Windows => Unknown/Multiple * milestone: 7.12.1 => ⊥ Comment: The bug is minor, but it's still there after 8 years. Here goes: In the file `/opt/ghc/7.10.1/lib/ghc-7.10.1/package.conf.d/base-4.8.0.0-1b689eb8d72c4d4cc88f445839c1f01a.conf` I make the following change: {{{ -haddock-interfaces: /opt/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/base.haddock +haddock-interfaces: $topdir/../../share/doc/ghc/html/libraries/base-4.8.0.0/base.haddock }}} The path that ghc-pkg returns for the haddock-interfaces files exists: {{{ $ ghc-pkg field base haddock-interfaces --package- db=/opt/ghc/7.10.1/lib/ghc-7.10.1/package.conf.d/ haddock-interfaces: /opt/ghc/7.10.1/lib/ghc-7.10.1/../../share/doc/ghc/html/libraries/base-4.8.0.0/base.haddock }}} But when I do the same query while telling ghc-pkg that the global package database is an empty package.conf.d directory, it returns the following: {{{ $ mkdir package.conf.d $ ghc-pkg field base haddock-interfaces --package- db=/opt/ghc/7.10.1/lib/ghc-7.10.1/package.conf.d/ --global-package- db=./package.conf.d/ haddock-interfaces: /home/thomas/package.conf.d/../../share/doc/ghc/html/libraries/base-4.8.0.0/base.haddock }}} Note that that last path doesn't exist. It made the wrong substitution for $topdir. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/1612#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler