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

Hackage trac at galois.com
Wed Dec 2 18:41:09 EST 2009


#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


More information about the cabal-devel mailing list