Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 142947 - font.eclass failed to update font cache correctly
Summary: font.eclass failed to update font cache correctly
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High minor
Assignee: foser (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-05 20:07 UTC by Xuefer
Modified: 2006-11-21 08:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xuefer 2006-08-05 20:07:09 UTC
expected result: emerging/unmerging fonts should update the font cache correctly.

actual result: after emerging fonts, fonts is scanned again and stored into $HOME if non-root users run a app that access the fonts.

reproduce steps:
cleanup:
# emerge --unmerge some-font-package
# cd /usr/share/fonts
# rm -f fonts.cache-1
# fc-cache
reproduce:
# emerge some-font-package
# grep some-font-package /usr/share/fonts/ fonts.cache-1
(not found)
# su non-rootuser
$ strace app-that-use-font
(u can tell from the output, it's accessing the fonts file slowly, and generate a cache in $HOME)
# cd /usr/share/fonts
# fc-cache
# grep some-font-package /usr/share/fonts/ fonts.cache-1
(found, no problem now)
Comment 1 foser (RETIRED) gentoo-dev 2006-08-06 02:09:48 UTC
The eclass assumes that the user/root does not run fc-cache at all, it may seriously unfluence it's functioning.

The cache file is per font, and not the one in the fonts root dir. The cache file should be in the 'equery f <font package>' output.
Comment 2 Xuefer 2006-08-12 06:05:04 UTC
you're right about the per font

 equery f arphicfonts
[ Searching for packages matching arphicfonts... ]
* Contents of media-fonts/arphicfonts-0.1-r2:
....
/usr/share/fonts/arphicfonts/fonts.cache-1

but this cache file is useless if /usr/share/fonts/fonts.cache-1 isn't updated by root. the eclass should update the system wide font cache, shouldn't it? this is something like env-update
Comment 3 foser (RETIRED) gentoo-dev 2006-11-21 08:25:08 UTC
No, the cache file in /usr/share/fonts is just the cache for that dir alone (and therefore empty). The eclass is correct as far as I can see, but not bulletproof to people experimenting with running fc-cache themselves (which is not reccomendable in our setup).

Anyway, the cache system has changed in the latest release (2.4.x) and the eclass has been updated accordingly. The possible problem here only applies to older releases.