Why are cabal reinstalls “always dangerous”?

懵懂的女人 提交于 2019-12-06 16:51:15

问题


When reinstalling a package using Cabal, one usually sees this warning:

Warning: Note that reinstalls are always dangerous. Continuing anyway...

What are some of the reasons behind this message?


回答1:


Currently, reinstalling a package means destructively overwriting an already installed package. If that old package has any reverse dependencies on the system, they'll no longer work.

To make this less likely, cabal-install checks the package databases it has access to when invoked for such reverse dependencies and lists them. In this situation, it requires --force-reinstalls to continue. But even if none reverse dependencies can be found, it does not mean there are none. It's possible there are additional package databases elsewhere on the system (for example, multiple user databases), or project directories that have been configured against the old version of the package that is to be overwritten. There's no way for cabal-install to be completely sure, that's why it warns that reinstalls are always dangerous.



来源:https://stackoverflow.com/questions/19692644/why-are-cabal-reinstalls-always-dangerous

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!