On Mon, 2005-10-03 at 16:17 -0400, Matthias Clasen wrote: > On Mon, 2005-10-03 at 15:51 -0400, Patrick Lam wrote: > > Matthias Clasen wrote: > > > Just trying this again, it worked when copying an x86_64 cache to a i386 > > > machine. Let me try the other way around again. I notice though, that > > > FcDirCacheValid() needs to become a bit smarter. It should not consider > > > a cache valid if it doesn't contain a section for the current platform. > > > Otherwise, fc-cache may fail to add a section for the current plaform, > > > since the cache file appears uptodate, timestamp-wise. > > > > Great. It ought to work the other way, if it works one way. But let me > > know what you find out. > > > > Good catch on FcDirCacheValid. I've just committed a fix for that which > > will be in 2.3.92. (Your mail arrived just a minute after I posted > > 2.3.91. Oh well.) Could you test that out too? > > Actually, thinking about FcDirCacheValid some more, I don't see how the single per-file timestamp can work at all with multi-platform cache files. Imagine that a new font gets installed in a directory with a multi-platform cache. If you then run fc-cache on i386, it'll update only the i386 section of the cache, but update the timestamp, marking the whole cache file as uptodate, so a later run on x86_64 will not update the x86_64 segment. I think the only solution to this is to put per-segment timestamps into the file, and use them to determine cache-outdatedness on a per-platform basis. Or simply use one cache file per platform... Matthias