Skip to content
This repository was archived by the owner on Feb 3, 2022. It is now read-only.
This repository was archived by the owner on Feb 3, 2022. It is now read-only.

WARNING: cache is out of date: c:/Program Files/Haskell Platform/7.10.2\lib\package.conf.d\package.cache #189

@thomie

Description

@thomie

Sven Panne reports that the package.cache is initially out-of-date, after installing GHC 7.10.2 RC2 on Windows:

$ ghc-pkg list -v
Timestamp 2015-07-06 19:15:52 UTC for c:/Program Files/Haskell Platform/7.10.2\lib\package.conf.d\package.cache
Timestamp 2015-07-07 07:51:56.8491787 UTC for c:/Program Files/Haskell Platform/7.10.2\lib\package.conf.d (NEWER than cache)
WARNING: cache is out of date: c:/Program Files/Haskell Platform/7.10.2\lib\package.conf.d\package.cache
ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
...

I think this is a bug in haskell-platform's install script for Windows.

Make sure that the lib\package.conf.d\package.cache file is always newer than the lib\package.conf.d directory. Either run ghc-pkg recache before release, or touch the package.cache file.

To verify that this is (most likely) not a bug in GHC's build system, I downloaded and unpacked https://www.haskell.org/ghc/dist/7.10.1/ghc-7.10.1-x86_64-unknown-mingw32.tar.bz2, and compared the timestamps of the cache file and its parent directory:

ls lib/package.conf.d/package.cache lib/package.conf.d -d --full-time
drwxr-xr-x 2 thomas thomas    540 2015-03-27 05:41:46.000000000 +0100 lib/package.conf.d/
-rw-r--r-- 1 thomas thomas 120677 2015-03-27 05:41:46.000000000 +0100 lib/package.conf.d/package.cache

Since those timestamps are the same, there won't be any problems here.

Edit:
Note that running ghc-pkg recache fixes the problem for users, but as Sven reports:

a) You have to do it as an Administrator, which might not be an option for all users.
b) The Windows installer for 7.10rc2 shouldn't install the package DB like this, forcing users to recache as an Administrator directly after installation.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions