summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-05-21 11:11:30 -0400
committerBen Gamari <ben@smart-cactus.org>2017-05-22 11:49:59 -0400
commitd6686a254293442a633482eae7ca78be968bef58 (patch)
treec32bde7521d025e29de858dc040154352ad02bd7 /ghc.mk
parent5179fd4d71ae67bfb34cedf1e1d4f3b3de8e974d (diff)
downloadhaskell-d6686a254293442a633482eae7ca78be968bef58.tar.gz
Ensure package.cache is newer than registration files after make install
Rebuild package.cache to ensure that it's newer than the package database registration files, avoiding out-of-date cache warnings from ghc-pkg. See #13375. Test Plan: `make install`, run `ghc-pkg list`, look for out-of-date cache warning Reviewers: austin Subscribers: rwbarton, thomie GHC Trac Issues: #13375 Differential Revision: https://phabricator.haskell.org/D3569
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/ghc.mk b/ghc.mk
index ce71a55233..ea02191434 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -1027,6 +1027,10 @@ install_packages: rts/dist/package.conf.install
# with an 077 umask.
for f in '$(INSTALLED_PACKAGE_CONF)'/*; do $(CREATE_DATA) "$$f"; done
+# Finally, update package.cache to ensure it's newer than the registration
+# files. This avoids #13375.
+ $(INSTALLED_GHC_PKG_REAL) --global-package-db "$(INSTALLED_PACKAGE_CONF)" recache
+
# -----------------------------------------------------------------------------
# Binary distributions