[Hackage] #437: generalise the package db settings and flags

Hackage cvs-ghc at haskell.org
Thu Mar 29 04:11:28 CEST 2012


#437: generalise the package db settings and flags
----------------------------+-----------------------------------------------
  Reporter:  duncan         |        Owner:         
      Type:  enhancement    |       Status:  closed 
  Priority:  normal         |    Milestone:         
 Component:  Cabal library  |      Version:  1.2.3.0
  Severity:  normal         |   Resolution:  fixed  
  Keywords:                 |   Difficulty:  normal 
Ghcversion:  6.8.3          |     Platform:         
----------------------------+-----------------------------------------------
Changes (by duncan):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 The new scheme looks like this:

  * `--global` sets the initial db stack to `[GlobalPackageDB]`
  * `--user` sets the initial db stack to `[GlobalPackageDB,
 UserPackageDB]`
  * `--package-db=clear` clears the db stack to `[]`
  * `--package-db=global` pushes `GlobalPackageDB` on the top of the stack
  * `--package-db=user` pushes `UserPackageDB` on the top of the stack
  * `--package-db=`''${otherfile}'' pushes `SpecificPackageDB`
 ''${otherfile}'' on the top of the stack

 So `--global` and `--user` just affect the initial db stack, and this can
 be extended by the `--package-db` flag, or completely reset using
 `--package-db=clear`.

 Note that we still cannot avoid using the global package db, that is it'll
 fail if we use `--package-db=clear --package-db=foo` because ghc always
 looks at the global package db anyway. See ghc ticket
 http://hackage.haskell.org/trac/ghc/ticket/5977

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



More information about the cabal-devel mailing list