summaryrefslogtreecommitdiffstats
path: root/source/x/fontconfig/fedora-patches/fontconfig-0-timestamp-dir-on-sb.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2020-12-01 20:18:01 +0000
committer Eric Hameleers <alien@slackware.com>2020-12-02 08:59:56 +0100
commitca24bdf2171b8756a322c99932f890bd69bcd86c (patch)
treec6c12f115015487c56365781e95395896227e44f /source/x/fontconfig/fedora-patches/fontconfig-0-timestamp-dir-on-sb.patch
parent153bd14cd07b76eca2248eb2224a5038969c474d (diff)
downloadcurrent-ca24bdf2171b8756a322c99932f890bd69bcd86c.tar.gz
current-ca24bdf2171b8756a322c99932f890bd69bcd86c.tar.xz
Tue Dec 1 20:18:01 UTC 202020201201201801
a/hwdata-0.342-noarch-1.txz: Upgraded. a/pam-1.5.1-x86_64-1.txz: Upgraded. ap/sqlite-3.34.0-x86_64-1.txz: Upgraded. l/libarchive-3.5.0-x86_64-1.txz: Upgraded. x/fontconfig-2.13.92-x86_64-1.txz: Upgraded. I'm pretty sure there was a good reason to switch to 2.13.92 on the devel release path, but I'm not sure the same can be said about 2.13.93. We'll stick with this one for now until there's a stable release or another good reason to bump it. x/xorg-server-1.20.10-x86_64-1.txz: Upgraded. x/xorg-server-xephyr-1.20.10-x86_64-1.txz: Upgraded. x/xorg-server-xnest-1.20.10-x86_64-1.txz: Upgraded. x/xorg-server-xvfb-1.20.10-x86_64-1.txz: Upgraded. x/xorg-server-xwayland-1.20.10-x86_64-1.txz: Upgraded. xap/gnuplot-5.4.1-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/x/fontconfig/fedora-patches/fontconfig-0-timestamp-dir-on-sb.patch')
-rw-r--r--source/x/fontconfig/fedora-patches/fontconfig-0-timestamp-dir-on-sb.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/source/x/fontconfig/fedora-patches/fontconfig-0-timestamp-dir-on-sb.patch b/source/x/fontconfig/fedora-patches/fontconfig-0-timestamp-dir-on-sb.patch
new file mode 100644
index 000000000..cfbc206f9
--- /dev/null
+++ b/source/x/fontconfig/fedora-patches/fontconfig-0-timestamp-dir-on-sb.patch
@@ -0,0 +1,55 @@
+diff --git a/src/fccache.c b/src/fccache.c
+index 2d398c73..7139b082 100644
+--- a/src/fccache.c
++++ b/src/fccache.c
+@@ -845,7 +845,7 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat)
+ FcCacheDir (cache), cache->checksum, (int) dir_stat->st_mtime);
+ #endif
+
+- return cache->checksum == (int) dir_stat->st_mtime && fnano;
++ return dir_stat->st_mtime == 0 || (cache->checksum == (int) dir_stat->st_mtime && fnano);
+ }
+
+ static FcBool
+@@ -1041,17 +1041,39 @@ static FcBool
+ FcDirCacheMapHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, struct timeval *latest_cache_mtime, void *closure)
+ {
+ FcCache *cache = FcDirCacheMapFd (config, fd, fd_stat, dir_stat);
+- struct timeval cache_mtime;
++ struct timeval cache_mtime, zero_mtime = { 0, 0}, dir_mtime;
+
+ if (!cache)
+ return FcFalse;
+ cache_mtime.tv_sec = fd_stat->st_mtime;
++ dir_mtime.tv_sec = dir_stat->st_mtime;
+ #ifdef HAVE_STRUCT_STAT_ST_MTIM
+ cache_mtime.tv_usec = fd_stat->st_mtim.tv_nsec / 1000;
++ dir_mtime.tv_usec = dir_stat->st_mtim.tv_nsec / 1000;
+ #else
+ cache_mtime.tv_usec = 0;
++ dir_mtime.tv_usec = 0;
+ #endif
+- if (timercmp (latest_cache_mtime, &cache_mtime, <))
++ /* special take care of OSTree */
++ if (!timercmp (&zero_mtime, &dir_mtime, !=))
++ {
++ if (!timercmp (&zero_mtime, &cache_mtime, !=))
++ {
++ if (*((FcCache **) closure))
++ FcDirCacheUnload (*((FcCache **) closure));
++ }
++ else if (*((FcCache **) closure) && !timercmp (&zero_mtime, latest_cache_mtime, !=))
++ {
++ FcDirCacheUnload (cache);
++ return FcFalse;
++ }
++ else if (timercmp (latest_cache_mtime, &cache_mtime, <))
++ {
++ if (*((FcCache **) closure))
++ FcDirCacheUnload (*((FcCache **) closure));
++ }
++ }
++ else if (timercmp (latest_cache_mtime, &cache_mtime, <))
+ {
+ if (*((FcCache **) closure))
+ FcDirCacheUnload (*((FcCache **) closure));