[commit: ghc] ghc-8.2: Ensure package.cache is newer than registration files after make install (4ea0868)

git at git.haskell.org git at git.haskell.org
Mon May 22 19:21:27 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/4ea0868737cfce7051bc10a731d5de152c93fde5/ghc

>---------------------------------------------------------------

commit 4ea0868737cfce7051bc10a731d5de152c93fde5
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Sun May 21 11:11:30 2017 -0400

    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
    
    (cherry picked from commit d6686a254293442a633482eae7ca78be968bef58)


>---------------------------------------------------------------

4ea0868737cfce7051bc10a731d5de152c93fde5
 ghc.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ghc.mk b/ghc.mk
index ca2aa95..004ac4a 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -1018,6 +1018,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
 



More information about the ghc-commits mailing list