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

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