Where should cabal install to by default?

Justin Bogner mail at justinbogner.com
Mon Aug 4 03:11:03 EDT 2008

Roman Leshchinskiy wrote:
> On 04/08/2008, at 06:19, Duncan Coutts wrote:
>> And many new users don't know what a path is or how to change one.
>> I'd like to avoid new users seeing:
>> $ cabal install xmonad
>> cabal: this didn't do what you expected, to fix it change the foo
>> setting in your bar file.
>> It's not friendly.
>> Actually at the moment it's worse though:
>> $ cabal install xmonad
>> [.. lots of build output .. ]
>> $ xmonad
>> bash: xmonad: command not found
>> # user gives up, assuming cabal is borked
> I don't think it's realistic to expect that things will magically work 
> for people who don't know what they are doing. In fact, I can't imagine 
> that there are a lot of people who would use cabal-install and not know 
> about paths. IMO, the goal should rather be to make installation simple 
> for those who do know what they are doing and also to prevent users from 
> shooting themselves in the foot as much as possible.
> That said, I would prefer installs to be global by default and to go 
> into the same directory/tree in which cabal-install itself lives. Also, 
> I don't think cabal-install itself should somehow invoke sudo. IMO, 
> local installs shouldn't have a default location; rather, the user would 
> be required to specify one in the prefs file or when invoking 
> cabal-install.
> Roman

I agree with Roman. Programs should not invoke sudo for users (If I need 
root access, I want to ask for it), and the default should be global 
rather than guessing a local path. With these two together you get a 
much deserved permission error if you simply run the program without 
configuring it or explicitly using root, which is the same as most other 
install tools and very sane, in my opinion.
Justin Bogner

More information about the Libraries mailing list