Bug 179491 - doesn't fully rebuild font data due to bad sed command.
doesn't fully rebuild font data due to bad sed command.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xorg-x11-xfs (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
:
Depends On:
Blocks: FC5Blocker
  Show dependency treegraph
 
Reported: 2006-01-31 14:59 EST by Bill Nottingham
Modified: 2014-03-16 22:57 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-09 04:28:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Nottingham 2006-01-31 14:59:13 EST
If you do:

find /usr/share/X11 -name fonts.dir -exec rm -f {} \;
service xfs restart

X does *not* start correctly, due to an inability to find fonts.

This appears to be because the sed in the script doesn't catch all font dirs:

$ chkfontpath --list
Current directories in font path:
1: /usr/X11R6/lib/X11/fonts/korean
2: /usr/share/X11/fonts/misc:unscaled
3: /usr/share/X11/fonts/75dpi:unscaled
4: /usr/share/X11/fonts/100dpi:unscaled
5: /usr/X11R6/lib/X11/fonts/misc
6: /usr/share/X11/fonts/Type1
7: /usr/X11R6/lib/X11/fonts/cyrillic
8: /usr/X11R6/lib/X11/fonts/TTF
9: /usr/X11R6/lib/X11/fonts/OTF
10: /usr/share/fonts/default/Type1
11: /usr/share/fonts/ISO8859-2/misc:unscaled
12: /usr/share/fonts/ISO8859-2/misc
13: /usr/share/fonts/KOI8-R/misc:unscaled
14: /usr/share/fonts/KOI8-R/100dpi:unscaled
15: /usr/share/fonts/KOI8-R/misc
16: /usr/share/fonts/KOI8-R/100dpi
17: /usr/share/fonts/tv-fonts
18: /usr/share/AbiSuite/fonts
19: /usr/lib/openoffice/share/fonts/truetype
20: /usr/share/fonts/korean/misc:unscaled
21: /usr/share/fonts/korean/misc
22: /usr/share/fonts/korean/TrueType
23: /usr/share/fonts/japanese/misc:unscaled
24: /usr/share/fonts/japanese/misc
25: /usr/share/fonts/japanese/TrueType
26: /usr/share/fonts/chinese/misc:unscaled
27: /usr/share/fonts/chinese/misc
28: /usr/share/fonts/chinese/TrueType
29: /usr/share/X11/fonts/misc:unscaled
30: /usr/share/X11/fonts/OTF
31: /usr/share/X11/fonts/TTF

As used in xfs.init:

$ /usr/sbin/chkfontpath --list | sed -e '/^Current/d;s#^[0-9]*:
##g;s#^/.*:[a-z]*$##g;/^[[:space:]]*$/d' | sort | uniq
/usr/lib/openoffice/share/fonts/truetype
/usr/share/AbiSuite/fonts
/usr/share/fonts/chinese/misc
/usr/share/fonts/chinese/TrueType
/usr/share/fonts/default/Type1
/usr/share/fonts/ISO8859-2/misc
/usr/share/fonts/japanese/misc
/usr/share/fonts/japanese/TrueType
/usr/share/fonts/KOI8-R/100dpi
/usr/share/fonts/KOI8-R/misc
/usr/share/fonts/korean/misc
/usr/share/fonts/korean/TrueType
/usr/share/fonts/tv-fonts
/usr/share/X11/fonts/OTF
/usr/share/X11/fonts/TTF
/usr/share/X11/fonts/Type1
/usr/X11R6/lib/X11/fonts/cyrillic
/usr/X11R6/lib/X11/fonts/korean
/usr/X11R6/lib/X11/fonts/misc
/usr/X11R6/lib/X11/fonts/OTF
/usr/X11R6/lib/X11/fonts/TTF

Notably missing:
 /usr/share/X11/fonts/100dpi
 /usr/share/X11/fonts/75dpi
 /usr/share/X11/fonts/misc

Perhaps you want something like:

$ chkfontpath --list | awk -F ':' '/^[0-9]+/ { print $2 }' | sort -u

?
Comment 1 Mike A. Harris 2006-01-31 17:47:04 EST
Hmm, indeed the code doesn't seem to take into account attribute flags.

Added to FC5Blocker, as nonworking fonts seem serious enough to be a higher
priority to fix.
Comment 2 Mike A. Harris 2006-02-09 04:28:02 EST
* Thu Feb  9 2006 Mike A. Harris <mharris@redhat.com> 1:1.0.1-2
- Removed invocation of fc-cache from xfs initscript for bug (#179362)
- Redirect stderr to /dev/null to squelch an unwanted error xfs.init (#155349)
- Replace "s#^/.*:[a-z]*$##g" with "s#:unscaled$##g" in xfs.init for (#179491)


I'm not sure what the thinking was originally behind the substitute operator
here, but it was flawed logic.  The replacement should do the right thing
with otherwise minimal impact/risk to the script.  I've tested it locally
and it seems to work ok (both at the commandline and in script).

Please test also, and report back results.

TIA
Comment 3 Bill Nottingham 2006-02-13 16:24:33 EST
Yep, seems to work in brief testing.

Note You need to log in before you can comment on or make changes to this bug.