[Hackage] #601: cabal setup doesn't respect --prefix

Hackage trac at galois.com
Mon Oct 26 05:28:40 EDT 2009


#601: cabal setup doesn't respect --prefix
----------------------------+-----------------------------------------------
  Reporter:  zooko          |        Owner:         
      Type:  defect         |       Status:  new    
  Priority:  normal         |    Milestone:         
 Component:  Cabal library  |      Version:  1.6.0.1
  Severity:  normal         |   Resolution:         
  Keywords:                 |   Difficulty:  unknown
Ghcversion:                 |     Platform:         
----------------------------+-----------------------------------------------
Comment (by duncan):

 Replying to [comment:2 zooko]:
 > So, it appears to me that if the user specifies {{{--prefix}}} then that
 should dictate the location of the package database as well as the other
 files.

 This is not possible if you want the installation to work by default. For
 packages to be used by ghc they must be registered in a package database.
 There are two default package databases and their location is independent
 of the prefix used for installing package files.

 As Saizan says, you can install into a non-default package database and
 your packages will not be available by default. Instead you will have to
 use eg:

 {{{
 ghci -package-conf /usr/local/stow/Cabal/var/lib/package.conf
 }}}

 Generally people do not actually want that as default behaviour. Hence the
 default (depending on the --global / --user flag) is to use one of the
 standard package databases.

 Supposing there were no global package database then you'd still need some
 other mechanism to register where packages are, eg Java uses the CLASSPATH
 etc. Making a persistent change to that requires some similar change to a
 file that is not inside the selected prefix.

 Perhaps we can at least make things a bit clearer, eg by checking up-front
 if we are likely to be able to modify the target package db and giving a
 more helpful error message.

 Any other suggestions for what we can improve here, otherwise we should
 close this ticket.

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


More information about the cabal-devel mailing list