Commit 3761cf4e authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Add a comment to explain the HcPkg.recache trick

For supporting multi instance registrations on older GHC versions.
parent fc1a23f8
......@@ -142,6 +142,15 @@ registerMultiInstance hpi verbosity packagedbs pkgInfo
= runProgramInvocation verbosity
(registerMultiInstanceInvocation hpi verbosity packagedbs (Right pkgInfo))
-- This is a trick. Older versions of GHC do not support the
-- --enable-multi-instance flag for ghc-pkg register but it turns out that
-- the same ability is available by using ghc-pkg recache. The recache
-- command is there to support distro package managers that like to work
-- by just installing files and running update commands, rather than
-- special add/remove commands. So the way to register by this method is
-- to write the package registration file directly into the package db and
-- then call hc-pkg recache.
--
| recacheMultiInstance hpi
= do let pkgdb = last packagedbs
writeRegistrationFileDirectly hpi pkgdb pkgInfo
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment