Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly does cabal install --avoid-reinstalls do?

I've found --avoid-reinstalls makes packages build where otherwise cabal fails. What exactly is it doing? Doesn't cabal already try to avoid reinstalls, or shouldn't it?

like image 681
jberryman Avatar asked Nov 12 '22 13:11

jberryman


1 Answers

This mailinglist post explains it pretty well: http://www.haskell.org/pipermail/beginners/2011-June/007502.html

The dependency resolution algorithm will try to make a consistent install plan that allows gitit to be run. However, in order to achieve that, it may decide that it's necessary to reinstall some existing packages in a new configuration (with other dependency or flag settings). Such reinstalls will then overwrite the previous package in the store, and if that previous package was depended on by something else, these other things will break.

The --avoid-reinstalls flag prevents exactly this behavior.

like image 153
sclv Avatar answered Nov 30 '22 12:11

sclv