rpms/fontconfig/OLPC-2 FcConfigUptoDate_fix.patch, NONE, 1.1 fontconfig.spec, 1.99, 1.100

Sayamindu Dasgupta (sayamind) fedora-extras-commits at redhat.com
Fri Feb 1 18:39:29 UTC 2008


Author: sayamind

Update of /cvs/pkgs/rpms/fontconfig/OLPC-2
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18247

Modified Files:
	fontconfig.spec 
Added Files:
	FcConfigUptoDate_fix.patch 
Log Message:
- Remove the verbose flag from fc-cache invocation during %post
- Fix FcConfigUptoDate() so that it prints a warning and then 
- returns FcTrue if timestamps of files/directories are in the future.
- Resolves: OLPC ticket #6046



FcConfigUptoDate_fix.patch:

--- NEW FILE FcConfigUptoDate_fix.patch ---
diff -Naur fontconfig-2.4.2/src/fccfg.c fontconfig-2.4.2-new/src/fccfg.c
--- fontconfig-2.4.2/src/fccfg.c	2008-02-01 21:13:20.000000000 +0530
+++ fontconfig-2.4.2-new/src/fccfg.c	2008-02-01 21:22:28.000000000 +0530
@@ -156,7 +156,18 @@
     (config_dir_time.set && (config_dir_time.time - config->rescanTime) > 0) ||
 	(font_time.set && (font_time.time - config->rescanTime) > 0))
     {
-	return FcFalse;
+	/* We need to check for potential clock problems here (OLPC ticket #6046) */
+	if ((config_time.set && (config_time.time - now) > 0) ||
+    	(config_dir_time.set && (config_dir_time.time - now) > 0) ||
+        (font_time.set && (font_time.time - now) > 0))
+	{
+	    fprintf (stderr,
+                    "Fontconfig warning: Directory/file mtime in the future. New fonts may not be detected\n");
+	    config->rescanTime = now;
+	    return FcTrue;
+	}
+	else
+	    return FcFalse;
     }
     config->rescanTime = now;
     return FcTrue;


Index: fontconfig.spec
===================================================================
RCS file: /cvs/pkgs/rpms/fontconfig/OLPC-2/fontconfig.spec,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- fontconfig.spec	21 Dec 2007 14:45:03 -0000	1.99
+++ fontconfig.spec	1 Feb 2008 18:38:35 -0000	1.100
@@ -3,11 +3,12 @@
 Summary: Font configuration and customization library
 Name: fontconfig
 Version: 2.4.2
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: MIT
 Group: System Environment/Libraries
 Source: http://fontconfig.org/release/fontconfig-%{version}.tar.gz
-Patch: mtime_fix.patch
+Patch0: mtime_fix.patch
+Patch1: FcConfigUptoDate_fix.patch
 URL: http://fontconfig.org
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 Source1: 25-no-hint-fedora.conf
@@ -51,6 +52,8 @@
 %prep
 %setup -q
 %patch -p1 -b .buildroot
+%patch1 -p1 -b .buildroot
+
 
 %build
 %configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF
@@ -107,7 +110,7 @@
 #  copy of fontconfig might install the binary instead of the first)
 # The HOME setting is to avoid problems if HOME hasn't been reset
 if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{version} ; then
-  HOME=/root /usr/bin/fc-cache -v -f
+  HOME=/root /usr/bin/fc-cache -f
 fi
 
 %postun -p /sbin/ldconfig
@@ -144,6 +147,12 @@
 %{_mandir}/man3/*
 
 %changelog
+* Thu Jan 31 2008 Sayamindu Dasgupta <sayamindu at gmail.com> 2.4.2-5
+- Remove the verbose flag from fc-cache invocation during %post
+- Fix FcConfigUptoDate() so that it prints a warning and then 
+- returns FcTrue if timestamps of files/directories are in the future.
+- Resolves: OLPC ticket #6046
+
 * Sun Dec  2 2007 Sayamindu Dasgupta <sayamindu at gmail.com> 2.4.2-4
 - Fix %post so that older cache files are deleted
 - Make fc-cache verbose to aid in debugging




More information about the fedora-extras-commits mailing list