Fix permissions of package.cache when installing; fixes trac #5311
authorIan Lynagh <igloo@earth.li>
Sun, 17 Jul 2011 18:58:37 +0000 (19:58 +0100)
committerIan Lynagh <igloo@earth.li>
Sun, 17 Jul 2011 18:58:37 +0000 (19:58 +0100)
When we install the packages, ghc-pkg obeys umask when creating
package.cache, but for everything else we specify the permissions. We
therefore fix the permissions of package.cache afterwards.

ghc.mk

diff --git a/ghc.mk b/ghc.mk
index 46e0d94..a929a51 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -888,6 +888,10 @@ install_packages: libffi/package.conf.install rts/package.conf.install
            $(call make-command,                                           \
                   "$(INSTALLED_GHC_PKG_REAL)"                             \
                       --global-conf "$(INSTALLED_PACKAGE_CONF)" hide $p))
+# when we install the packages above, ghc-pkg obeys umask when creating
+# package.cache, but for everything else we specify the permissions. We
+# therefore now fix the permissions of package.cache
+       $(CREATE_DATA) '$(INSTALLED_PACKAGE_CONF)/package.cache'
 
 # -----------------------------------------------------------------------------
 # Binary distributions