[Haskell-cafe] Re: Why cabal forces reinstallation of
ivan.miljenovic at gmail.com
Tue May 4 22:13:03 EDT 2010
On 5 May 2010 12:04, Maciej Piechotka <uzytkownik2 at gmail.com> wrote:
> 1. I downloaded happstack-utile
> 2. Edited cabal file
> 3. Installed it successfully linking with parsec 3.1
> 4. I tried to run cabal install happstack --constraint 'parsec >= 3'
> 5. It complains that happstack-utile needs to be installed against
> parsec 2
>  Now it is HStringTemplate but problem is the same
Did you try editing the HStringTemplate cabal file to remove its
constraint against parsec >= 3?
Also, is there any reason why you're forcing that constraint through
(yes, upstream should start using parec-3, but why use --constraint to
try and force it yourself)?
> If I just run:
> % runhaskell Setup.hs configure --user
> All seems to be ok but
> % cabal install
> Wants to reinstall packages (or complains about constraints).
Note that with its dependency resolution stuff, cabal-install tries to
ensure you have an entire working and consistent set of dependencies,
whereas doing it manually will happily break everything.
> It is not a missing dependency. It is that the cabal-install tries to
> use dependencies from hackage instead of installed packages.
Not quite: if its already installed and working, cabal-install will
use it; if there is some inconsistency (e.g. package Foo was built
against Bar-x but you now have Bar-y installed) then cabal-install
will try rebuilding that package; note that if you installed it from a
local edited repository then cabal-install doesn't know this and will
get the official hackage version.
Also, I note that you seem to use the Gentoo Haskell overlay (as
you've made bug reports about it) but you're also building packages by
hand; this can also lead to problems (don't mix your packages kids!).
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
More information about the Haskell-Cafe