patch applied (cabal): Add a unuque identifier for installed packages (part 1 of 9)

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sat Aug 22 11:36:07 EDT 2009


Thu Aug  6 06:19:28 PDT 2009  Simon Marlow <marlowsd at gmail.com>
  * Add a unuque identifier for installed packages (part 1 of 9)
  Ignore-this: b774e5719e666baee504e1f52381cc8b
    
    NOTE: the patch has been split into 9 pieces for easy
    reviewing, the individual pieces won't build on their own.
    
  Part 1 does the following:
  
  Distribution.Package: 
    - define the InstalledPackageId type as a newtype of String
  
  Distribution.InstalledPackageInfo:
    - add an installedPackageId field to InstalledPackageInfo
    - change the type of the depends field from [PackageIdentifier]
      to [InstalledPackageId]
  
  
  The idea behind this change is to add a way to uniquely identify
  installed packages, letting us decouple the identity of an installed
  package instance from its package name and version.  The benefits of
  this are
  
    - We get to detect when a package is broken because its
      dependencies have been recompiled, or because it is being
      used with a different package than it was compiled against.
  
    - We have the possibility of having multiple instances of a
      given <package>-<version> installed at the same time.  In the
      future this might be used for "ways".  It might also be
      useful during the process of upgrading/recompiling packages.

    M ./Distribution/InstalledPackageInfo.hs -11 +10
    M ./Distribution/Package.hs -3 +24

View patch online:
http://darcs.haskell.org/cabal/_darcs/patches/20090806131928-12142-5ef3fc82a89f7ab5dd920f7552863b94cc83bbce.gz



More information about the cabal-devel mailing list