Skip to content
Snippets Groups Projects
Unverified Commit 1fed638e authored by Matthew Pickering's avatar Matthew Pickering Committed by Zubin
Browse files

hadrian: Call ghc-pkg recache after copying package database into bindist

The package.cache needs to have a later mod-time than all of the .conf
files. This invariant can be destroyed by `cp -r` and so we run `ghc-pkg
recache` to ensure the package database which is distributed is
consistent.

If you are installing a relocatable bindist, for example, on windows,
you should preserve mtimes by using cp -a or run ghc-pkg recache after
installing.

(cherry picked from commit 957fe359)
parent d8ac8aaf
No related branches found
No related tags found
No related merge requests found
...@@ -150,7 +150,14 @@ bindistRules = do ...@@ -150,7 +150,14 @@ bindistRules = do
else createFileLink install_path unversioned_install_path else createFileLink install_path unversioned_install_path
copyDirectory (ghcBuildDir -/- "lib") bindistFilesDir copyDirectory (ghcBuildDir -/- "lib") bindistFilesDir
copyDirectory (rtsIncludeDir) bindistFilesDir copyDirectory (rtsIncludeDir) bindistFilesDir
-- Call ghc-pkg recache, after copying so the package.cache is
-- accurate, then it's on the distributor to use `cp -a` to install
-- a relocatable bindist.
cmd_ (bindistFilesDir -/- "bin" -/- "ghc-pkg") ["recache"]
need ["docs"] need ["docs"]
-- TODO: we should only embed the docs that have been generated -- TODO: we should only embed the docs that have been generated
-- depending on the current settings (flavours' "ghcDocs" field and -- depending on the current settings (flavours' "ghcDocs" field and
-- "--docs=.." command-line flag) -- "--docs=.." command-line flag)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment