Skip to content
  • Duncan Coutts's avatar
    Add new HcPkg.registerMultiInstance · 7b4df7e0
    Duncan Coutts authored
    This supports the feature of newer ghc-pkg version which have the
    register --enable-multi-instance flag. This allows registering multiple
    instances of the same version of a package into a single database.
    
    In addition, to support the same feature on some older ghc-pkg versions,
    the HcPkgInfo has a recacheMultiInstance capability, which tells us if
    the trick of registering multiple instances by running ghc-pkg recache
    works. This is known to work for all versions of ghc-pkg that support
    the recache command at all.
    
    Then HcPkg.registerMultiInstance will use one of the two methods
    depending on which is supported, or fail if neither is. Currently only
    registering into specific package dbs is supported, not global or user.
    
    This new multi-instance feature is needed for cabal-install.
    7b4df7e0