[Hackage] #289: symlink binaries into ~/bin

Hackage trac at galois.com
Sun Aug 3 14:53:39 EDT 2008


#289: symlink binaries into ~/bin
---------------------------------+------------------------------------------
  Reporter:  duncan              |        Owner:                     
      Type:  enhancement         |       Status:  new                
  Priority:  normal              |    Milestone:  Cabal-1.4          
 Component:  cabal-install tool  |      Version:                     
  Severity:  normal              |   Resolution:                     
  Keywords:                      |   Difficulty:  very easy (<1 hour)
Ghcversion:  6.8.2               |     Platform:                     
---------------------------------+------------------------------------------
Comment (by duncan):

 Replying to [comment:8 igloo]:
 > For what it's worth, I agree with what I think Isaac is saying: Cabal
 should not put things in `~/bin` unless I explicitly tell it to.
 >
 > Anything under `~/.cabal/` is fine, so for example you could put things
 in `~/.cabal/bin/` and recommend that I add that to my path.

 For distros that put `~/.bin` on the `$PATH` I think we're failing unless
 we can make things just work. For systems not set up that way we'll have
 to ask or tell the user what to do.

 Remember most Ubuntu users don't even know what a `$PATH` is let along how
 to change one. Ubuntu sets things up such that if the `~/bin` dir exists
 then it gets put on the `$PATH` however it doesn't create the dir by
 default for new accounts. For Fedora it's apparently always on the `$PATH`
 even if it does not exist.

 So when we first set up the user's default `~/.cabal/config` we should
 check if `~/bin` is on the `$PATH`. If not we should tell the user that
 they need to take some action to make the executables available (either to
 put `~/bin` or `~/.cabal/bin` on the `$PATH`).

 It should also print out what configuration its chosen the first time you
 run it, when it creates `~/.cabal/config` so people know what it's going
 to do and what file to edit.

 I know you think we should never touch `~/bin` at all, but I think not
 working by default for standard distro setups is not a good option.

 I rather suspect we'll have to do different things on different platforms.
 For example OSX does not help us with per-user bin dirs at all, though it
 does have `/usr/local/bin` and cabal-install can use a sudo style command,
 so perhaps that's a sensible default on OSX.

 I'll try and get this issue of defaults discussed on some mailing list.

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


More information about the cabal-devel mailing list