When emerging a xorg font (for example, media-fonts/font-adobe-100dpi) the xorg-2 eclass correctly updates fonts.scale (which it, curiously, calls "font.scale"), fonts.dir and the "global fontcache". But when uninstalling, it only updates the global fontcache, leaving fonts.scale and fonts.dir stale. Then xlsfonts still lists the fonts (even after a re-login) and xfontsel crashes (hangs) when selecting them. It appears that all the cache-files should be updated on uninstallation. Reproduction: emerge -1n media-fonts/font-adobe-100dpi emerge -C media-fonts/font-adobe-100dpi Log out Log in xlsfonts -fn '-*-helvetica-bold-r-normal--*-*-100-100-*-*-*-*' (it still lists the fonts, but shouldn't) Emerge any other 100dpi font Log out Log in xlsfonts -fn '-*-helvetica-bold-r-normal--*-*-100-100-*-*-*-*' (the fonts are gone now, as the should have been already earlier) emerge -1 media-fonts/font-adobe-100dpi Log out Log in xlsfonts -fn '-*-helvetica-bold-r-normal--*-*-100-100-*-*-*-*' (the fonts are back)
(In reply to comment #0) > xorg-2 eclass correctly updates fonts.scale (which it, curiously, calls > "font.scale") Fixed the typo. > fonts.dir and the "global fontcache". But when uninstalling, it > only updates the global fontcache, leaving fonts.scale and fonts.dir stale. > Then xlsfonts still lists the fonts (even after a re-login) and xfontsel > crashes (hangs) when selecting them. It appears that all the cache-files should > be updated on uninstallation. Seems right. AFAIK font.eclass will remove stale generated files when all fonts are removed so we should be free to regen them.
Created attachment 289305 [details, diff] Update fonts.scale & fonts.dir on font removal. This way, user won't end up with invalid fonts in the listings (and thus segfaulting xfontsel). Fixes:
Patch title (first comment line): Update fonts.scale & fonts.dir on font removal. Autocommit cvs commit -F .msg 'xorg-2.eclass' /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v <-- xorg-2.eclass new revision: 1.50; previous revision: 1.49