Blame SOURCES/fontconfig-stop-cleanup-uuid.patch

27ca55
From 5f12f564f8748deaa603adb7a4b8f616b6390ad4 Mon Sep 17 00:00:00 2001
27ca55
From: Keith Packard <keithp@keithp.com>
27ca55
Date: Wed, 17 Oct 2018 21:15:47 -0700
27ca55
Subject: [PATCH 1/2] Do not remove UUID file when a scanned directory is empty
27ca55
27ca55
Because FcDirCacheDeleteUUID does not reset the modification time on
27ca55
the directory, and because FcDirCacheRead unconditionally creates the
27ca55
UUID file each time it is run, any empty directory in the cache will
27ca55
get its timestamp changed each time the cache for that directory is
27ca55
read.
27ca55
27ca55
Instead, just leave the UUID file around as it is harmless.
27ca55
27ca55
The alternative would be to only create the UUID file after the cache
27ca55
has been created and the directory has been discovered to be
27ca55
non-empty, but that would delay the creation of the UUID file.
27ca55
27ca55
Signed-off-by: Keith Packard <keithp@keithp.com>
27ca55
---
27ca55
 src/fcdir.c | 7 -------
27ca55
 1 file changed, 7 deletions(-)
27ca55
27ca55
diff --git a/src/fcdir.c b/src/fcdir.c
27ca55
index 93f220c..bfcdf95 100644
27ca55
--- a/src/fcdir.c
27ca55
+++ b/src/fcdir.c
27ca55
@@ -421,13 +421,6 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config)
27ca55
     /* Not using existing cache file, construct new cache */
27ca55
     if (!cache)
27ca55
 	cache = FcDirCacheScan (dir, config);
27ca55
-    if (cache)
27ca55
-    {
27ca55
-	FcFontSet *fs = FcCacheSet (cache);
27ca55
-
27ca55
-	if (cache->dirs_count == 0 && (!fs || fs->nfont == 0))
27ca55
-	    FcDirCacheDeleteUUID (dir, config);
27ca55
-    }
27ca55
 
27ca55
     return cache;
27ca55
 }
27ca55
-- 
27ca55
2.19.1
27ca55
27ca55
From e9113a764a1001165711022aceb45aa2765feb8b Mon Sep 17 00:00:00 2001
27ca55
From: Akira TAGOH <akira@tagoh.org>
27ca55
Date: Thu, 25 Oct 2018 07:16:32 +0000
27ca55
Subject: [PATCH 2/2] Do not run a test case for .uuid deletion
27ca55
27ca55
---
27ca55
 test/run-test.sh | 28 ++++++++++++++--------------
27ca55
 1 file changed, 14 insertions(+), 14 deletions(-)
27ca55
27ca55
diff --git a/test/run-test.sh b/test/run-test.sh
27ca55
index e76e39b..ed41456 100644
27ca55
--- a/test/run-test.sh
27ca55
+++ b/test/run-test.sh
27ca55
@@ -239,19 +239,19 @@ fi
27ca55
 
27ca55
 rm -rf $MyPWD/sysroot
27ca55
 
27ca55
-dotest "deleting .uuid file on empty dir"
27ca55
-prep
27ca55
-cp $FONT1 $FONT2 $FONTDIR
27ca55
-$FCCACHE $FONTDIR
27ca55
-sleep 1
27ca55
-rm -f $FONTDIR/*pcf
27ca55
-$FCCACHE $FONTDIR
27ca55
-rmdir $FONTDIR > /dev/null 2>&1
27ca55
-if [ $? != 0 ]; then
27ca55
-  echo "*** Test failed: $TEST"
27ca55
-  echo "$FONTDIR isn't empty"
27ca55
-  ls -al $FONTDIR
27ca55
-  exit 1
27ca55
-fi
27ca55
+# dotest "deleting .uuid file on empty dir"
27ca55
+# prep
27ca55
+# cp $FONT1 $FONT2 $FONTDIR
27ca55
+# $FCCACHE $FONTDIR
27ca55
+# sleep 1
27ca55
+# rm -f $FONTDIR/*pcf
27ca55
+# $FCCACHE $FONTDIR
27ca55
+# rmdir $FONTDIR > /dev/null 2>&1
27ca55
+# if [ $? != 0 ]; then
27ca55
+#   echo "*** Test failed: $TEST"
27ca55
+#   echo "$FONTDIR isn't empty"
27ca55
+#   ls -al $FONTDIR
27ca55
+#   exit 1
27ca55
+# fi
27ca55
 
27ca55
 rm -rf $FONTDIR $CACHEFILE $CACHEDIR $FONTCONFIG_FILE out
27ca55
-- 
27ca55
2.19.1
27ca55