Bug 480512

Summary: fontconfig - fc-cache refuses to write caches
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: fontconfigAssignee: Behdad Esfahbod <behdad>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: behdad, beland, fonts-bugs, i18n-bugs, petersen, sangu.fedora, yaneti
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-19 22:24:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fix none

Description Michal Jaegermann 2009-01-18 00:37:33 UTC
Description of problem:

The latest rawhide updates on my system brought the following fonts:

bitstream-vera-sans-fonts
bitstream-vera-sans-mono-fonts
bitstream-vera-serif-fonts
dejavu-lgc-sans-fonts
dejavu-lgc-sans-mono-fonts
dejavu-lgc-serif-fonts
dejavu-sans-fonts
dejavu-sans-mono-fonts
dejavu-serif-fonts

With every of those packages I got a message like this:

/usr/share/fonts/dejavu: failed to write cache

It turns out that messages are coming from /usr/bin/fc-cache and running '/usr/bin/fc-cache -v /usr/share/fonts/dejavu' produces the following:

/usr/share/fonts/dejavu: caching, new cache contents: 42 fonts, 0 dirs
/usr/share/fonts/dejavu: failed to write cache
/var/cache/fontconfig: cleaning cache directory
/root/.fontconfig: not cleaning non-existent cache directory
/usr/bin/fc-cache: failed

Check with strace reveals what follows:

open("/var/cache/fontconfig/12b26b760a24f8b4feb03ad48a333a72-x86-64.cache-2", O_
RDONLY) = -1 ENOENT (No such file or directory)
open("/root/.fontconfig/12b26b760a24f8b4feb03ad48a333a72-x86-64.cache-2", O_RDON
LY) = -1 ENOENT (No such file or directory)
write(2, "/usr/share/fonts/dejavu: failed t"..., 47) = 47
unlink("/var/cache/fontconfig/12b26b760a24f8b4feb03ad48a333a72-x86-64.cache-2") 
= -1 ENOENT (No such file or directory)
unlink("/root/.fontconfig/12b26b760a24f8b4feb03ad48a333a72-x86-64.cache-2") = -1
 ENOENT (No such file or directory)

Attempts to open new files with O_RDONLY?  I do not think that this is going to work.

Version-Release number of selected component (if applicable):
fontconfig-2.6.90-3.git.63.g6bb4b9a.fc11.x86_64

How reproducible:
On every try.

Comment 1 Yanko Kaneti 2009-01-18 07:16:55 UTC
Created attachment 329296 [details]
fix

Comment 2 Nicolas Mailhot 2009-01-19 19:18:48 UTC
*** Bug 480669 has been marked as a duplicate of this bug. ***

Comment 3 Behdad Esfahbod 2009-01-19 22:24:23 UTC
Will hit rawhide tomorrow.