Why does cabal unnecessarily reinstall dependencies?

Hello cafe, When I want to locally install my own package through "cabal install" it tries to reinstall dependencies convertible-1.0.9.1, HDBC-2.2.6.1 and HDBC-mysql-0.6.3 even though they are already installed (and work fine). Why does it do this? cabal-install version 0.8.2 using version 1.8.0.2 of the Cabal library Mac OS Leopard Thanks, Martijn.

On 23 November 2010 08:26, Martijn van Steenbergen
Hello cafe,
When I want to locally install my own package through "cabal install" it tries to reinstall dependencies convertible-1.0.9.1, HDBC-2.2.6.1 and HDBC-mysql-0.6.3 even though they are already installed (and work fine). Why does it do this?
1) Does "ghc-pkg check" complain about them? If so, it will rebuild them. 2) Do you mean it rebuilds the same version or a different/older version? 3) Did you build those packages with any compile-time flags, constraints, etc.? If so, I believe cabal-install defaults to wanting to rebuild them with the default settings. I believe that if you want to stop cabal-install from rebuilding non-broken packages, that unpacking what you want to install and then running "cabal install" within that directory (as opposed to doing "cabal install foo") is meant to work. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Mon, Nov 22, 2010 at 22:26, Martijn van Steenbergen
Hello cafe, Hello
When I want to locally install my own package through "cabal install" it tries to reinstall dependencies convertible-1.0.9.1, HDBC-2.2.6.1 and HDBC-mysql-0.6.3 even though they are already installed (and work fine). Why does it do this?
cabal-install version 0.8.2 using version 1.8.0.2 of the Cabal library Mac OS Leopard
I had exactly the same problem on Mac OS snow leopard. My cabal package was just broken, wrongly installed, or whatever (I installed it from mac ports). The solution is to deinstall it and to install it from tarball as explained here : http://jan.varwig.org/archive/getting-cabal-to-run-on-mac-os-x-leopard

It might be that it both your own package and the dependencies cabal
tries to reinstall all depend on some package P. If the dependencies
are installed depending on P version 1, but to satisfy all
dependencies for your own package, cabal needs them to depend on P
version 2, cabal will reinstall them (possibly breaking other packages
that depend on them; is this a bug?)
You can see if this is the case by running 'cabal install --dry-run -v'.
Erik
On Mon, Nov 22, 2010 at 22:26, Martijn van Steenbergen
Hello cafe,
When I want to locally install my own package through "cabal install" it tries to reinstall dependencies convertible-1.0.9.1, HDBC-2.2.6.1 and HDBC-mysql-0.6.3 even though they are already installed (and work fine). Why does it do this?
cabal-install version 0.8.2 using version 1.8.0.2 of the Cabal library Mac OS Leopard
Thanks,
Martijn. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I've noticed that ghc-6.10.4 did not work well with cabal-install version 0.8.2. (cabal install gtk did not work.) Everything was fine after I switched back to: cabal-install version 0.6.2 using version 1.6.0.3 of the Cabal library and removing the Cabal 1.8... library package. Cheers Christian Am 22.11.2010 22:26, schrieb Martijn van Steenbergen:
Hello cafe,
When I want to locally install my own package through "cabal install" it tries to reinstall dependencies convertible-1.0.9.1, HDBC-2.2.6.1 and HDBC-mysql-0.6.3 even though they are already installed (and work fine). Why does it do this?
cabal-install version 0.8.2 using version 1.8.0.2 of the Cabal library Mac OS Leopard
Thanks,
Martijn.
participants (5)
-
Christian Maeder
-
Erik Hesselink
-
Ivan Lazar Miljenovic
-
Martijn van Steenbergen
-
Nicolas Maupu