[Hackage] #615: cabal install attempts to reinstall "same version" of already-installed package

#615: cabal install attempts to reinstall "same version" of already-installed package ---------------------------------+------------------------------------------ Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: Linux | ---------------------------------+------------------------------------------ This is on ghc 6.12.1 rc2. The problem occurs because I installed a different version of ghc-syb than the one in hackage, but which retained the same version *number* as the one in hackage. Bumping up the version number of the alternate version, solved the problem, but it was confusing, and I believe I may have experienced this before without understanding what was happening. The alternate version of ghc-syb I used is at git://github.com/waern/ghc- syb.git I was working on scion to try and get it to build on ghc 6.12.1, and when I tried to cabal install it from my working directory, cabal install started to reinstall ghc-syb - even though ghc-syb was already installed, with the same version number as the version it was trying to reinstall. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/615 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#615: cabal install attempts to reinstall "same version" of already-installed package ---------------------------------+------------------------------------------ Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: Keywords: | Difficulty: very hard (<1 week) Ghcversion: | Platform: ---------------------------------+------------------------------------------ Changes (by duncan): * difficulty: unknown => very hard (<1 week) * platform: Linux => Comment: If you do a --dry-run with -v it'll probably tell you that it's reinstalling the package because it has different and incompatible dependencies. The solver only chooses relatively late between the installed and version of a package and the one from hackage. It does this because it is sometimes necessary to rebuild packages to get consistent dependencies. At the end, if it's possible it'll substitute installed instances in the plan instead of rebuilding things. However that's not possible if the dependencies of the installed one clash with the other versions of packages that the solver has already selected. In general it is a good idea to bump the version if there are substantial changes. Since the solver does rather rely on the assumption that the hackage and installed instances of the same package version are essentially the same. There are a few ways this could be improved. If we used a completely different solver implementation it might be able to try harder to pick installed package instances rather than falling back to rebuilding. There is also the possibility to use "installed constraints" where you tell the solver explicitly to only use an installed instance of a particular package. This would only be a workaround of course. Ideally you'd like it to try harder in the first place to avoid rebuilding. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/615#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage