[Hackage] #645: confusing interface: cabal "install" subcommand
has two clashing meanings (was: cabal-install ignores --prefix)
Hackage
trac at galois.com
Sat Mar 27 11:01:50 EDT 2010
#645: confusing interface: cabal "install" subcommand has two clashing meanings
---------------------------------+------------------------------------------
Reporter: StefanK | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: cabal-install tool | Version: 1.6.0.1
Severity: normal | Keywords:
Difficulty: unknown | Ghcversion:
Platform: |
---------------------------------+------------------------------------------
Comment(by duncan):
Replying to [ticket:645 StefanK]:
> {{{
> rm -rf ~/.ghc ~/.cabal
> cabal clean
> cabal configure --user --prefix="${HOME}/opt"
> cabal build
> cabal install
> }}}
> will install the binaries in '/home/sk/.cabal/bin' instead of
'/home/sk/opt/bin'.
So what is confusing here is that `cabal install` does everything. It
configures, builds and installs. In particular because it configures, it
takes all the configuration options and overrides any previous configure.
So it will work as expected if you do:
{{{
cabal clean
cabal install --user --prefix="${HOME}/opt"
}}}
The problem is that we have two clashing meanings for install. There's the
original meaning from the simple single package setting, where it means
"assume we have configured and built, now install". The package manager
meaning is "configure, build and install this package, and all of its
dependencies".
The question is how we reconcile these two meanings. One might imagine
that we could tell if the package is already configured and not-
reconfigure. In general, for an arbitrary build system that's not really
possible.
Suggestions welcome.
Another option might be for `cabal install` to use the saved configuration
rather than a fresh configuration.
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/645#comment:2>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list