guix/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
Sarah Morgensen 6f12880a76
gnu: fontconfig: Use (locally) deterministic caching
Make fontconfig use directory contents rather than modification time to
determine cache validity (by pretending that mtime is broken).

* gnu/packages/patches/fontconfig-cache-ignore-mtime.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/fontutils.scm (fontconfig)[source]: Use it.
[arguments]: Unset SOURCE_DATE_EPOCH for tests.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-07-11 18:17:31 +02:00

15 lines
438 B
Diff

Pretend that stat's mtime is broken, so that the fontconfig cache does not
depend upon modification time to determine if a cache is stale.
diff --git a/src/fcstat.c b/src/fcstat.c
index 5a2bd7c..d603a96 100644
--- a/src/fcstat.c
+++ b/src/fcstat.c
@@ -431,6 +431,7 @@ FcIsFsMmapSafe (int fd)
FcBool
FcIsFsMtimeBroken (const FcChar8 *dir)
{
+ return FcTrue;
int fd = FcOpen ((const char *) dir, O_RDONLY);
if (fd != -1)