Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 384649 - Fonts inheriting "xorg-2" eclass should update fonts.scale and fonts.dir also on uninstallation
Summary: Fonts inheriting "xorg-2" eclass should update fonts.scale and fonts.dir also...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2011-09-27 12:20 UTC by Siim Ainsaar
Modified: 2011-10-14 20:28 UTC (History)
0 users

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


Attachments
Update fonts.scale & fonts.dir on font removal. (Update-fontsscale--fontsdir-on-font-removal.patch,1.51 KB, patch)
2011-10-09 08:07 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Siim Ainsaar 2011-09-27 12:20:42 UTC
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)
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-10-09 07:48:53 UTC
(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.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-10-09 08:07:53 UTC
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:
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-10-14 20:28:10 UTC
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