Re: [PATCH] Do not remove UUID file when a scanned directory is empty

"Keith Packard" <[email protected]> Mon, 29 Oct 2018 15:05:00 -0700
Newsgroups gmane.comp.fonts.fontconfig
Message-ID <[email protected]>
Akira TAGOH <[email protected]> writes:

> That wouldn't be impossible though that needs to change the logic a
> lot. but yes, that would be sane way and better doing like what
> fontconfig deals with caches, in the future.

Hrm. I didn't understand what the uuid files were being used for.

Reading through the code, it looks like they are an attempt to share
cache files when there is more than one path name used for the same
directory? And that by storing the UUID file in the font directory, you
provide a stable name for the cache file even if the directory is
accessed through a different path name.

If this is true, then I'm not sure I can see how we could move the .uuid
files to a separate directory and retain this property.

Is my understanding of why this mechanism was created correct? If so,
I'd like to suggest that we just remove it; I think it's more important
for fontconfig to avoid modifying the font directories than for it to
avoid replicating cache information in the (rare?) case that there is
more the one path to the same font directory.

We could use the 'realpath(3)' function during the generation of the
cache file name; that would at least avoid having symlinks cause
problems.

-- 
-keith

_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
signature.asc (application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAlvXhAwACgkQ2yIaaQAA
ABEovA//QPyBvTIz5RLtuOO0ICTXrK59a1So0YowG2awCCZ6i0e/wfQ8rEI+bO0k
ln7UAJqHlVgS0VT3tSPm9rOhnE6UtSiO2IPw1kr4NXSBtMFAT8IMoA4FmwIEHtz3
3CvPq3Sqg6Dfsr2uOjktH4moDsLwa55IfuC1kIzcAD5BfxkJhXaJRYKZHASsdQ4j
szCUjcVsVRNvgqMH0sjbYXFHx98l5XrDzELHmaNjDubV+mhZXHiquTVsMlLDd2Su
YE7MJngW1Vc1P+H7WQQdcBt3x1b9vymS3RnmFeETn6bSFP2tRb0nniiYCvqF3Jy/
bD6PntWS1vnZa7XWKNZySeO061YthsQWRrwZPXttWn54+gnYWqHk00D2BTHHcMro
xQSpiWeWlVDJO48l4b4YoQspLkl99R/7Ptx6wNNFUrTDk4q1ann0XIMp64FEkeXA
AuVnTE292Hjq3wO780QzZLa5NwBONuc1xhgBo3rzFKG84i4CUyy9Vbd0fXZTFpun
ejYdMzpRvqZQXc5ono0IRqFmFixXY7od94y5BOqugeHMvAEHXwgcO05TjjCjfQjK
W+yXKkqy/tHDUv+Te+Ds+53iQAGNA1U65ZQ+ouILbCs/C5Ztiw8Chlen9RvDv324
kYHFOWJxZU/YrAV9IsndEZPn/9HH2Ujm+K4+lK9ZrWXFeOW13do=
=qliu
-----END PGP SIGNATURE-----