patch applied (cabal-install): Use user installs by default
duncan.coutts at worc.ox.ac.uk
Mon May 7 05:27:36 EDT 2007
On Mon, 2007-05-07 at 09:20 +0100, Simon Marlow wrote:
> Duncan Coutts wrote:
> > Fri May 4 03:46:52 PDT 2007 Duncan Coutts <duncan.coutts at worc.ox.ac.uk>
> > * Use user installs by default
> > So it "Just Works"tm without needing extra options or sudo fiddling.
> > If you care you can still do sudo fiddling and --global-install
> This is inconsistent with Cabal and ghc-pkg, which both use global installs by
> default. At the time we felt that global installs were the more common case. I
> know this isn't a clear-cut issue though, and there are good arguments on both
> sides. For example, one could argue that only the system's package manager
> should install packages globally, so since we're bypassing the system package
> manager we should default to user installs.
> However, I'm more concerned that we are consistent, and avoid surprising
> behaviour where possible.
The surprising behaviour I was trying to avoid was that by default it'd
fail with an unhelpful error message. Having it work seems to be a
When doing manual, configure, build, install steps people are familiar
with the notion that the install step needs to be done as root. When we
are installing a whole set of packages automagically we don't quite have
the same connection to the individual build steps and we kind of expect
things to "Just Work"tm without a great deal of intervention.
The only way we can do this is if you always run cabal-install as root.
We'd have to make it clearer to people through the command line UI that
this is the thing to do. This is also a slightly thing to get right,
since if the user runs cabal-install update as non-root then the package
db gets downloaded to their $HOME/.cabal-install/packages but if you
then do cabal-install install as root then /root/.cabal-install/packages
or /var/cache/cabal-install/packages probably is not up to date.
As it happens, I'm not sure that --global by default for ghc-pkg and
--user by default for cabal-install isn't right. The difference is in
who is likely to be using the command and what level of control they
I'm cc'ing cabal-devel. Hopefully we can get some more opinions on this.
More information about the Cvs-libraries