By default, even with --global it will still scan package.conf.d of the user unless you also specify --no-user-package-conf like this:
ghc-pkg list --global --no-user-package-conf --package-conf $HOME/sandbox/package.conf.d You can also set the GHC_PACKAGE_PATH variable like this: export GHC_PACKAGE_PATH=$HOME/sandbox/package.conf.d: ghc-pkg list --no-user-package-conf On Thu, Apr 14, 2011 at 3:09 PM, C Rodrigues <[email protected]> wrote: > Hello, > > > I'd like to know how ghc-pkg searches package databases and how the > command-line flags affect the search. > > > My model of ghc-pkg was that it builds a list of package databases and then > searches them starting from the head. I'd like to work with a sandboxed > local package database. Looking at what ghc-pkg list prints, I can infer > what database list it's using: > > > ghc-pkg list: [user-db, global-db] > > > ghc-pkg list --global: [global-db] > > > ghc-pkg list --global --package-conf=$HOME/sandbox/package.conf.d: > [sandbox-db, global-db] > > > However, even though ghc-pkg doesn't show my user database, it still > reports broken packages that are in my user database. So ghc-pkg isn't > really scanning packages according to this database list. What is it doing? > > > _______________________________________________ > Glasgow-haskell-users mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users > >
_______________________________________________ Glasgow-haskell-users mailing list [email protected] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
