summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
diff options
context:
space:
mode:
authorSarah Morgensen <iskarian@mgsn.dev>2021-06-18 17:52:05 -0700
committerLudovic Courtès <ludo@gnu.org>2021-07-11 18:17:31 +0200
commit6f12880a76a6c91058718d15845f8b9d9b529a5a (patch)
tree099a2b83d254c93ba850dbfa1782ea0ec752b59c /gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
parent9b4c3c675c05870e5983c21ce4ff944e0b0bc2fa (diff)
downloadguix-patches-6f12880a76a6c91058718d15845f8b9d9b529a5a.tar
guix-patches-6f12880a76a6c91058718d15845f8b9d9b529a5a.tar.gz
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>
Diffstat (limited to 'gnu/packages/patches/fontconfig-cache-ignore-mtime.patch')
-rw-r--r--gnu/packages/patches/fontconfig-cache-ignore-mtime.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch b/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
new file mode 100644
index 0000000000..b6e942ee10
--- /dev/null
+++ b/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
@@ -0,0 +1,15 @@
+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)