On Fri, Dec 05, 2008 at 05:53:52PM +0000, Duncan Coutts wrote: > > The way the solver works is that it does not commit to using the > installed version until the last possible minute. It does this because > the installed versions have much tighter constraints on dependencies. It > does a pass at the end to improve the solution by replacing available > packages by already installed ones wherever possible. > > Currently it does that by checking if all the deps are exactly the same. > If they are not then it decides it's not suitable. We could relax that > slightly by instead checking if all the constraints that picking the > installed instance are consistent with the existing constraints. If they > are consistent then we can pick the installed one (and add the > constraints to the constraint set). If the conflict then we have to pick > the available version and do a re-install.
If I understand correctly what happens, I think the current cabal-install behaviour is a bug (and the above change will make it less likely to happen, but not fix it): If cabal-install reinstalls foo-0.1 with different deps, and you have bar-0.1 installed which depends on foo-0.1, then cabal-install also needs to reinstall bar-0.1. And it should check that it will be able to do so before it reinstalls foo-0.1 (so in particular, it would fail when trying to replace a dependency of the ghc package). It would also be nice if it told you what it was going to do in advance, and gave you the opportunity to abort, similar to: $ sudo apt-get install libc6 The following extra packages will be installed: libc6-dbg libc6-dev libc6-i386 The following packages will be upgraded: libc6 libc6-dbg libc6-dev libc6-i386 Do you want to continue [Y/n]? Thanks Ian _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc