[Fontconfig] Re: Structure of cache files

Josselin Mouette joss at debian.org
Wed Dec 7 00:40:53 PST 2005


Le mardi 06 décembre 2005 à 23:04 -0500, Patrick Lam a écrit :
> Josselin Mouette wrote:
> > It would indeed solve both problems simultaneously.
> > Maybe, for performance, would it be better to
> > use /var/cache/fontconfig/$hash.cache files, $hash being generated from
> > the original pathname ?
> 
> How does the attached patch look?

Great ! I don't have enough knowledge of the fontconfig internals, but
it looks simple enough to work. Although, I'd have the same remark as
Keith about the hash: using a MD5 hash would be much better, as the code
isn't collision-safe.

> Is fontconfig supposed to be
> responsible for creating /var/cache/fontconfig, or can it rely on the
> packager? Also is hardcoding /var/cache/fontconfig the right thing?

I think you should use ${localstatedir}/cache/fontconfig instead.
Furthermore, the makefiles should create this directory in DESTDIR in
the install target. Packagers will either use this directory or create
it themselves, this isn't a problem.

Regards,
-- 
 .''`.           Josselin Mouette        /\./\
: :' :           josselin.mouette at ens-lyon.org
`. `'                        joss at debian.org
   `-  Debian GNU/Linux -- The power of freedom



More information about the Fontconfig mailing list