Description of Problem: When having /usr shared between some hosts, the installation of fontconfig fails in the %post scriptlet which results in multiple installed fontconfig packages: | $ rpm -U fontconfig-0.0.1.020811.1151-4.i386.rpm | Fehler: execution of %post scriptlet from fontconfig-0.0.1.020811.1151-4 failed, exit status 41 | $ rpm -q fontconfig | fontconfig-0.0.1.020626.1517-6 | fontconfig-0.0.1.020811.1151-4 See bug #51193 also. Version-Release number of selected component (if applicable): fontconfig-0.0.1.020811.1151-4 Steps to Reproduce: 1. setup system so that /usr is NFS-mounted (ro) 2. add /usr to rpm's %_netsharepath 3. try to install fontconfig
Wow, this would be really hard to fix, since you'd have make fc-cache have a command line argument "ignore failures in these directories" or something, which would be a bit crazy. Probably easier to just move the cache files to /var/.
(There is some idea upstream of moving the cache files)
*** Bug 73321 has been marked as a duplicate of this bug. ***
Still in fontconfig-2.1-2
I've filed an upstream bug: http://fontconfig.org/cgi-bin/bugzilla/show_bug.cgi?id=9 Just putting the cache files in /var seems like the right thing to do to me.
To prevent misunderstandings: In the upstream report you are saying: "... if /usr is readonly, fontconfig could create cache files in a different location". Although it would be wise to use /var/cache for these cache-files, my initial report describes a packaging error. /usr/.../fonts are shared between several hosts; exactly one host can write there, the other ones have read-only access. When the host with the write-rights installs the fontconfig package, it updates the cache-files and the other clients can use them. These clients do not need to call 'fc-cache' or should ignore failures. I do not know which errors are detected by 'fc-cache' (the return values seems to be the count of directories where it failed), but changing the %post scriptlet to | %post | ... | HOME=/root fc-cache -f 2>/dev/null || true ~~~~~~~ seems to be sufficient. (Especially, because the corresponding error-messages are thrown away and the user does not know why 'rpm' failed).
fontconfig-2.2.1 in fact fixes - it won't try to write to directories where it doesn't have write access. I should have a package in Rawhide later today.