[Haskell-cafe] Re: Why cabal forces reinstallation of
schlepptop at henning-thielemann.de
Thu May 6 04:03:25 EDT 2010
Daniel Fischer schrieb:
> On Wednesday 05 May 2010 15:45:38, Henning Thielemann wrote:
>> Surprisingly using plain Cabal (runhaskell Setup configure; runhaskell
>> Setup build; runhaskell Setup install) often works in these cases.
> That's not surprising.
> runhaskell ./Setup.hs configure
> can only go by what the .cabal file in the current directory and ghc-pkg
> say. If you edit the .cabal file to install e.g. happstack-util-0.5.0 with
> parsec-3, the changed .cabal file and the ghc-pkg output are consistent, so
> Cabal sees no reason to reinstall.
> cabal-install presumably looks at the downloaded index from Hackage (it
> must recursively follow the dependencies to see which of them must be
> installed before [and in which order]).
> The happstack-util .cabal file there says parsec < 3.
> But ghc-pkg says
> - there is no parsec < 3 installed
> - happstack-util-0.5.0 was built with parsec-3.*
> (don't know which check comes first if both are made).
> That is inconsistent with what cabal-install knows from other sources,
> hence it assumes it's broken.
This makes sense. It would be certainly better if cabal-install would
alert about the found inconsistency instead of trying to fix it. Then
there might an additional cabal-install flag, that makes cabal-install
prefer the output of ghc-pkg over the hackage database 00-index.tar in
case of inconsistencies.
Could the problem also be solved by changing the version of packages
with locally modified cabal files from a.b.c.d to a.b.c.d+1 ?
More information about the Haskell-Cafe