[Haskell-cafe] cabal --user question
frederik at a5.repetae.net
Sun Jul 10 20:00:13 EDT 2005
Thanks for the quick reply!
> > How do I install a package in the user package.conf with cabal? It is
> > not clear to me how to do this, looking at the output of 'configure
> > --help'. There is an option "--user" to get dependencies from the user
> > cabal file but this still, somewhat counterintuitively, tries to
> > install the package in the global location (why would one want such
> > behavior?). Specifying '--with-hc-pkg="ghc-pkg --user"' doesn't seem
> > to work either, when I do this then 'install' and 'unregister'
> > complete without error but apparently have no effect.
> ./setup configure --user #if it depends on user-local packages
> ./setup build
> ./setup install --user
Ah, I see.
> Perhaps install --user should be the default if you configure --user.
Yeah, it seems somewhat inconsistent - everything about the
installation of a package is usually controlled by 'configure' options
(e.g. in autoconf), even in cabal the prefix is still part of
'configure' but the other relevant installation parameter is specified
as an option to 'install'...
For one, it means that I can't just call "./setup unregister" to
unregister my package, I have to remember which arguments I passed to
'register' or 'install'. It seems like a bad design to me. At the very
least, I should be able to specify the default behavior (user or
global) at configure time so that if I run these commands without
arguments they behave in a way that is consistent with each other and
with the package configuration.
Is there a reason why there is no 'uninstall' command, by the way? It
might be useful.
Also, I would shorten the '--copy-prefix' argument to 'copy' to just
'--prefix' unless there is a good reason for having it that way. The
"copy-" part seems reduntant to me. That's my opinion.
> The user's guide is here:
More information about the Haskell-Cafe