[Fontconfig] Cache and FAT

Mikhail Gusarov dottedmag at dottedmag.net
Wed Dec 9 01:57:38 PST 2009


Twas brillig at 21:18:18 08.12.2009 UTC-05 when behdad at behdad.org did gyre and gimble:

 >> 1) scan directory and subdirectories and use max(mtimes, ctimes) of
 >> all files as mtime of directory.

 BE> Would be a PITA.

 >> 2) add "hash" field to directory cache which is hash of all
 >>     subdirectories' hashes and directory contents.

 BE> Isn't option #1 superior to this?  And doesn't need a change to the
 BE> cache format.

I've came up with the following scenario:

dir/
  foo.ttf (mtime=5,ctime=5)

otherdir/
  bar.ttf (mtime=4,ctime=4)

mv otherdir/bar.ttf dir =>

dir/
  foo.ttf (mtime=5,ctime=5)
  bar.ttf (mtime=4,ctime=4)

First variant will fail to detect new font in dir/ in this case, as
Windows does not change any timestamp on moved file.

Also, it should be possible to reuse mtime field in cache file for a
hash (32-bit one, as cryptographical sthrength is not necessary here).

 >> is it a good idea to add boolean attribute for <dir>  entry in config?

 BE> No.  Why?

Something like <dir broken_mtime="true">/foo/bar</dir>

Or it could be detected runtime, with something platform-dependent, like
statfs(2).

 BE> Please file a bug so we can track this.

Sure. #25535

-- 
  http://fossarchy.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20091209/519df624/attachment.pgp 


More information about the Fontconfig mailing list