Your message dated Thu, 31 Dec 2009 22:13:53 +0000
with message-id <[email protected]>
and subject line Bug#498948: fixed in fontconfig 2.8.0-2
has caused the Debian Bug report #498948,
regarding fontconfig: Proposal for single run of fc-cache per apt-get run
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
498948: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498948
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: fontconfig
Version: 2.6.0-1
Severity: wishlist


So I just installed a bunch of fonts and BOY IS IT SLOW.

There are two things going on.

(1) "Updating fontconfig cache for /usr/share/fonts/..."
(2) "Regenerating fonts cache"
#2 is done independently by a very large number of font packages calling

HOME=/root fc-cache -f -v 1>/var/log/fontconfig.log 2>&1

#1 is done by a large number of packages calling 

defoma-font --reregister-all /etc/defoma/hints/XXX.hints

which ends up calling /usr/share/defoma/scripts/fontconfig.defoma, which
calls 

fc-cache -f
and
fc-cache -s *TWICE*.

So fc-cache can be run four or more times *per font installation*.  And 
it actually needs to be run precisely once per apt-get run.

The obvious way to fix this is dpkg triggers.  fontconfig should have a 
trigger on any change to /usr/share/fonts which causes it to regenerate
the cache.  fontconfig.triggers would look like this:

interest /usr/share/fonts

And fontconfig.postinst would be patched like this:
--- fontconfig.postinst 2008-09-14 12:52:55.000000000 -0400
+++ fontconfig.postinst.new     2008-09-14 12:54:27.000000000 -0400
@@ -37,6 +37,8 @@
   done
   printf "done.\n"
   fi
+fi
+if [ "$1" = "configure" ] || [ "$1" = "triggered" ]
   # Force regeneration of all fontconfig cache files.
   mkdir -p /var/cache/fontconfig
   printf "Regenerating fonts cache... "

This would allow bugs to be filed on all packages (except fontconfig and 
defoma) which run fc-cache in postinst, to just remove those explicit 
invocations.  That would speed things up quite a bit.  This should be 
done *now*.

---

The interaction with defoma is much trickier and a much larger problem.  
First of all, defoma *could* be invoked on a nonstandard directory,
which would require a hand run of fc-cache.  It could also be invoked by 
hand for locally installed fonts in /usr/local or the user's home 
directory.

Second, the current fontconfig.defoma script does something very ugly in 
its 'term' subroutine.  It runs fc-cache, then blows away 
/var/lib/defoma/fontconfig.d/fonts.conf, then runs fc-list to determine 
the accessible font directories "without" defoma, then rebuilds 
/var/lib/defoma/fontconfig.d/fonts.conf, then runs fc-cache AGAIN.

This is hideous and very, very slow.  I don't see any way to avoid this 
when using locally installed fonts, for which it is pretty much doing 
the right thing.  There's got to be some way to bypass this for packaged 
fonts, however.  I figure we can simply detect whether we're dealing 
with a subdirectory of /usr/share/fonts, and assume that we're in a 
'packaged' situation then, and if not, assume that we're not.  I almost 
finished a patch to do exactly this, but I hit a problem.

The problem is that the rebuilding of 
/var/lib/defoma/fontconfig.d/fonts.conf *both* rebuilds the directory 
list (which we can just skip for fonts in the standard directories under 
/usr/share/fonts), *and* the aliases and substitutes lists (which I 
believe we *can't* skip -- if we can skip them, tell me and I'll attach 
the patch for fontconfig.defoma).  I'm not currently seeing how to 
preserve the directory list while rebuilding the aliases and substitutes 
lists.

If you could break the file into two pieces, one for the directories and 
one for the aliases and substitutions, it would be quite straightforward 
to rewrite fontconfig.defoma to skip all the tedious cache rebuilds when 
it's dealing with a font in /usr/share/fonts.  (All such fonts should be 
handled by dpkg, and therefore we can rely on the trigger to rebuild the 
cache.)

-- Nathanael Nerode (neroden at gcc dot gnu dot org)

Versions of packages fontconfig depends on:
ii  fontconfig-config             2.6.0-1    generic font configuration library
ii  libc6                         2.7-13     GNU C Library: Shared libraries
ii  libfontconfig1                2.6.0-1    generic font configuration library

fontconfig recommends no packages.

Versions of packages fontconfig suggests:
ii  defoma                       0.11.10-0.2 Debian Font Manager -- automatic f

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: fontconfig
Source-Version: 2.8.0-2

We believe that the bug you reported is fixed in the latest version of
fontconfig, which is due to be installed in the Debian FTP archive:

fontconfig-config_2.8.0-2_all.deb
  to main/f/fontconfig/fontconfig-config_2.8.0-2_all.deb
fontconfig-udeb_2.8.0-2_i386.udeb
  to main/f/fontconfig/fontconfig-udeb_2.8.0-2_i386.udeb
fontconfig_2.8.0-2.diff.gz
  to main/f/fontconfig/fontconfig_2.8.0-2.diff.gz
fontconfig_2.8.0-2.dsc
  to main/f/fontconfig/fontconfig_2.8.0-2.dsc
fontconfig_2.8.0-2_i386.deb
  to main/f/fontconfig/fontconfig_2.8.0-2_i386.deb
libfontconfig1-dbg_2.8.0-2_i386.deb
  to main/f/fontconfig/libfontconfig1-dbg_2.8.0-2_i386.deb
libfontconfig1-dev_2.8.0-2_i386.deb
  to main/f/fontconfig/libfontconfig1-dev_2.8.0-2_i386.deb
libfontconfig1_2.8.0-2_i386.deb
  to main/f/fontconfig/libfontconfig1_2.8.0-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Keith Packard <[email protected]> (supplier of updated fontconfig package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 31 Dec 2009 13:44:56 -0800
Source: fontconfig
Binary: fontconfig fontconfig-config fontconfig-udeb libfontconfig1-dev 
libfontconfig1 libfontconfig1-dbg
Architecture: source all i386
Version: 2.8.0-2
Distribution: unstable
Urgency: low
Maintainer: Keith Packard <[email protected]>
Changed-By: Keith Packard <[email protected]>
Description: 
 fontconfig - generic font configuration library - support binaries
 fontconfig-config - generic font configuration library - configuration
 fontconfig-udeb - generic font configuration library - minimal runtime (udeb)
 libfontconfig1 - generic font configuration library - runtime
 libfontconfig1-dbg - generic font configuration library - debugging symbols
 libfontconfig1-dev - generic font configuration library - development
Closes: 317881 382213 409922 430371 451277 461269 498948 501700 517161 542332 
542835 550338 560054
Changes: 
 fontconfig (2.8.0-2) unstable; urgency=low
 .
   * Package with defoma debhelper files from version 0.11.10-4
   * Updated postinst script to follow defoma debhelper style for detecting
     presence of defoma
   * ACK NMU 2.8.0-1.1 from Cyril Brulebois <[email protected]>, fixed this
     time by using new defoma bits.
   * ttf-bitstream-vera is back in the archive (Closes: #461269)
   * The trigger mechanism means that fc-cache only runs once now.
     (Closes: #317881, #382213, #498948)
   * Add Provides: libfontconfig to libfontconfig1 control
     (Closes: #542835)
   * Remove stale reference to XFree86 (Closes: #550338)
   * Change dependency on ttf-dejavu to ttf-dejavu-core (Closes: #517161)
   * Upstream cache file name changes remove explicit architecture
     names (Closes: #501700)
   * Change debconf question to reference DejaVu as default Debian font.
     Note that the ml and ta translations couldn't be mechanically
     converted. (Closes: #430371, #409922)
   * Add cross building support (Neil Williams) (Closes: #451277)
   * Close wishes for newer fontconfig (Closes: #542332, #560054)
Checksums-Sha1: 
 696f087b7ba70d7464a535a01ee450128a1253c6 1223 fontconfig_2.8.0-2.dsc
 7132c2b645973a58b60c3594bbd04407aca88fe7 50018 fontconfig_2.8.0-2.diff.gz
 e6da9bf1255b0fd5bd5f1b378a46ba0c8e7a4577 217100 
fontconfig-config_2.8.0-2_all.deb
 9b0ce22e45b82c5f03f8f14065c2bde8b0f70c35 273792 libfontconfig1_2.8.0-2_i386.deb
 51126cc655c3dd54f215a03900b0cab376cf9cf9 332784 fontconfig_2.8.0-2_i386.deb
 0a2419faaab9e2453c55235869910f539e0129dc 108692 
fontconfig-udeb_2.8.0-2_i386.udeb
 36c7867a63fad808fc28cc8e4092f26f0240773a 817666 
libfontconfig1-dev_2.8.0-2_i386.deb
 5aa348372bed9687862dd8e2cfe67fae1a88e4cf 344960 
libfontconfig1-dbg_2.8.0-2_i386.deb
Checksums-Sha256: 
 b3ecfeb32e7b2995691efe4d0aa0835bcd24e6b391e4eff554581fe050f77702 1223 
fontconfig_2.8.0-2.dsc
 52bdabc4b518ed6722bb4d1ed767a41dbb01824fb7b78e4d9695426cde7b78b4 50018 
fontconfig_2.8.0-2.diff.gz
 fc8f34208968773785b7f02d268d02c5f6806d86d13076edea03f5e307427e3a 217100 
fontconfig-config_2.8.0-2_all.deb
 026075a87dfb7e6af4a3e62414139bc29b9ae6003d408146a980548c9e4bc5cd 273792 
libfontconfig1_2.8.0-2_i386.deb
 ee8e7591a4dc2a4d2fed6eb4bbae7c17eb481a7dc8de07538107bbfb24403412 332784 
fontconfig_2.8.0-2_i386.deb
 d6371d0cb00cc6139eb860c759a394b9251996aa092b711ca498b0cdf64a5aa1 108692 
fontconfig-udeb_2.8.0-2_i386.udeb
 b49e60f8c513e3b882f5c4f8e6b7b1fea117a7c95af1c8f98dd60c2cbe861873 817666 
libfontconfig1-dev_2.8.0-2_i386.deb
 63ad277f923a5ff605705c1fb1d45afca12bc91c307a1595c5503c180d393971 344960 
libfontconfig1-dbg_2.8.0-2_i386.deb
Files: 
 8e3a312b355e8d6dae754c7c07d778e5 1223 fonts optional fontconfig_2.8.0-2.dsc
 04dcb6a84f6285d8d2d64b302e28726a 50018 fonts optional 
fontconfig_2.8.0-2.diff.gz
 87052cddb22caf778332a29b726792b9 217100 fonts optional 
fontconfig-config_2.8.0-2_all.deb
 056a4db61c490662d5a745c947a1e4f7 273792 libs optional 
libfontconfig1_2.8.0-2_i386.deb
 302a1dfba9b04ab878f2904f7b398bd9 332784 fonts optional 
fontconfig_2.8.0-2_i386.deb
 16ee89fd5b27c15b40d7a4b2164be68c 108692 debian-installer extra 
fontconfig-udeb_2.8.0-2_i386.udeb
 abd0f4b2ee69b23f00d4741b74ec6c24 817666 libdevel optional 
libfontconfig1-dev_2.8.0-2_i386.deb
 d6f453c18c4cd6cc0d03e741d70b8f13 344960 debug extra 
libfontconfig1-dbg_2.8.0-2_i386.deb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFLPRydQp8BWwlsTdMRAiKsAJ9x2swLHA1vmU3EorHSTQo+9OB++ACg2Y1s
kXheUyt1xhgoPLOqtH0SpgA=
=ln74
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to