First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 91470
Alias:
Product:
Component:
Status: CLOSED
Resolution: FIXED
Assigned To: Gentoo X packagers <x11@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Jim Dabell <jim@bugs.gentoo.org.dabell.name>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 91470 depends on: Show dependency tree
Bug 91470 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.




View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-05-04 12:05 0000
xorg-x11 supplies the /etc/init.d/xfs script.  This script contains the
following:

# While we at it, update fontconfig's cache as well
if [ -x /usr/bin/fc-cache -a "${changed}" = "yes" ]
then
    ebegin "Updating FC cache"
    HOME="/root" /usr/bin/fc-cache -f
    eend 0
fi

It appears that the -f flag rebuilds all the font caches even if they are up to
date.  When there are a lot of fonts installed, this is a big waste of time,
and significantly slows down boot-up time (the code always executes on
boot-up).  On my system, fc-cache -f takes 2 minutes to execute, while fc-cache
takes under a second, both in the typical scenario of no caches to update.

Since fc-cache can apparently detect for itself when rebuilding a cache is
necessary, why is the shell-script check there, when you can just omit the -f
flag instead?

I would rewrite the above code as:

# While we at it, ensure fontconfig's cache is up to date
if [ -x /usr/bin/fc-cache ]
then
    ebegin "Updating FC cache"
    HOME="/root" /usr/bin/fc-cache
    eend 0
fi



Reproducible: Always
Steps to Reproduce:

------- Comment #1 From Donnie Berkholz 2005-05-04 17:39:41 0000 -------
You're clearly correct that the -f is a bad idea on a number of levels. But
since we already have ${changed}, why waste the time of even running fc-cache
if it's unnecessary?

------- Comment #2 From foser (RETIRED) 2005-05-05 04:30:52 0000 -------
I didn't know it was there, 'fc-cache -f' was bad for the fonts eclass (altough
that will change). But I think there is indeed little point in having it.

------- Comment #3 From Donnie Berkholz 2005-05-23 20:13:01 0000 -------
Fixed in 6.8.2-r2 and 6.8.99.5. Thanks!

------- Comment #4 From Jim Dabell 2006-11-16 19:39:17 0000 -------
Closing.

First Last Prev Next    No search results available      Search page      Enter new bug