Dirk Mueller
2006-Feb-02 08:54 UTC
[Fontconfig] [PATCH] never try to validate cache files when using fc-cache -f
Hi, 2006-02-02 Dirk Mueller <dmueller@suse.com> * fc-cache/fc-cache.c (scanDirs): Don''t check for cache validity if force is in effect. -------------- next part -------------- A non-text attachment was scrubbed... Name: make_fccache_f_work.diff Type: text/x-diff Size: 635 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20060202/9ae51c68/make_fccache_f_work.bin
Patrick Lam
2006-Feb-02 09:45 UTC
[Fontconfig] [PATCH] never try to validate cache files when using fc-cache -f
Dirk Mueller wrote:> Hi, > > 2006-02-02 Dirk Mueller <dmueller@suse.com> > > * fc-cache/fc-cache.c (scanDirs): Don''t check for > cache validity if force is in effect.This patch doesn''t do what you''re saying. The effect of this patch is to always blow away cache files when -f is given, and that''s going to be problematic on multi-arch installations. The check a couple of lines above: if (!force && FcDirCacheValid (dir) && FcDirCacheHasCurrentArch (dir)) checks for cache validity and ought to ensure that -f will try to save the cache files. Of course it might fail for some other reason. -f works for me. Does it not work for you? What should the semantics of -f be? Perhaps there should be -f and --really-force, which would always remove cache files; that''s certainly not what we want to give when we make install. pat
Dirk Mueller
2006-Feb-02 11:45 UTC
[Fontconfig] [PATCH] never try to validate cache files when using fc-cache -f
On Thursday 02 February 2006 18:47, Patrick Lam wrote:> if (!force && FcDirCacheValid (dir) && FcDirCacheHasCurrentArch (dir)) > > checks for cache validity and ought to ensure that -f will try to save > the cache files. Of course it might fail for some other reason.Hmm, indeed. but I want one switch to make sure no corrupt cache files stay around, as we have way too many problems with them. The man page says: Force re-generation of apparently up-to-date cache files, overriding the timestamp checking.> -f works for me. Does it not work for you? What should the semantics > of -f be? Perhaps there should be -f and --really-force, which would > always remove cache files; that''s certainly not what we want to give > when we make install.what does make install have to do with it (curious)? Indeed, the normal behaviour whould be to just run "fc-cache" I think. Dirk
Patrick Lam
2006-Feb-02 11:50 UTC
[Fontconfig] [PATCH] never try to validate cache files when using fc-cache -f
Dirk Mueller wrote:> On Thursday 02 February 2006 18:47, Patrick Lam wrote: > > >> if (!force && FcDirCacheValid (dir) && FcDirCacheHasCurrentArch (dir)) >> >>checks for cache validity and ought to ensure that -f will try to save >>the cache files. Of course it might fail for some other reason. > > Hmm, indeed. but I want one switch to make sure no corrupt cache files stay > around, as we have way too many problems with them.It would be great to have a --really-force flag, then. The man page doesn''t think about the issues involved in multiarch cache files.>>-f works for me. Does it not work for you? What should the semantics >>of -f be? Perhaps there should be -f and --really-force, which would >>always remove cache files; that''s certainly not what we want to give >>when we make install. > > > what does make install have to do with it (curious)? Indeed, the normal > behaviour whould be to just run "fc-cache" I think.make install runs fc-cache -f -v, as I''d imagine postinst scripts would as well. pat
Frederic Crozat
2006-Feb-03 00:40 UTC
[Fontconfig] [PATCH] never try to validate cache files when using fc-cache -f
Le jeudi 02 f?vrier 2006 ? 14:50 -0500, Patrick Lam a ?crit :> Dirk Mueller wrote: > > On Thursday 02 February 2006 18:47, Patrick Lam wrote: > > > > > >> if (!force && FcDirCacheValid (dir) && FcDirCacheHasCurrentArch (dir)) > >> > >>checks for cache validity and ought to ensure that -f will try to save > >>the cache files. Of course it might fail for some other reason. > > > > Hmm, indeed. but I want one switch to make sure no corrupt cache files stay > > around, as we have way too many problems with them. > > It would be great to have a --really-force flag, then. The man page > doesn''t think about the issues involved in multiarch cache files. > > >>-f works for me. Does it not work for you? What should the semantics > >>of -f be? Perhaps there should be -f and --really-force, which would > >>always remove cache files; that''s certainly not what we want to give > >>when we make install. > > > > > > what does make install have to do with it (curious)? Indeed, the normal > > behaviour whould be to just run "fc-cache" I think. > > make install runs fc-cache -f -v, as I''d imagine postinst scripts would > as well.Well, I''m doing fc-cache -f in %post of fontconfig package but older version of caches are sometime in the way and only rm -f /var/cache/fontconfig/* can fix it :( -- Frederic Crozat <fcrozat@mandriva.com> Mandriva
Mike FABIAN
2006-Feb-03 02:10 UTC
[Fontconfig] Re: never try to validate cache files when using fc-cache -f
Frederic Crozat <fcrozat@mandriva.com> ????????:> Le jeudi 02 f?vrier 2006 ? 14:50 -0500, Patrick Lam a ?crit : >> Dirk Mueller wrote: >> > On Thursday 02 February 2006 18:47, Patrick Lam wrote: >> > >> > >> >> if (!force && FcDirCacheValid (dir) && FcDirCacheHasCurrentArch (dir)) >> >> >> >>checks for cache validity and ought to ensure that -f will try to save >> >>the cache files. Of course it might fail for some other reason. >> > >> > Hmm, indeed. but I want one switch to make sure no corrupt cache files stay >> > around, as we have way too many problems with them. >> >> It would be great to have a --really-force flag, then. The man page >> doesn''t think about the issues involved in multiarch cache files.By the way, another option to remove cache files in /var/cache/fontconfig for directories which don''t exist anymore would be nice. Deleting such cache files always is probably not a good idea because directories might be temporarily unavailable (e.g. nfs mounts). But having an option to clean up old junk in /var/cache/fontconfig without having to delete everything there would be nice. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian ?????????????