[Bug 819097] Re: fontconfig: don't "clean up" on new installs

Michael Vogt michael.vogt at ubuntu.com
Wed Aug 17 10:04:27 UTC 2011


** Bug watch added: Debian Bug tracker #636173
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636173

** Also affects: fontconfig (Debian) via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636173
   Importance: Unknown
       Status: Unknown

** Changed in: fontconfig (Ubuntu)
       Status: New => Confirmed

** Changed in: fontconfig (Ubuntu)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to fontconfig in Ubuntu.
https://bugs.launchpad.net/bugs/819097

Title:
  fontconfig: don't "clean up" on new installs

Status in “fontconfig” package in Ubuntu:
  Confirmed
Status in “fontconfig” package in Debian:
  Unknown

Bug description:
  This is a re-reporting of Debian #636173, since the actual failure is
  only triggered on Ubuntu.

  debian/fontconfig.postinst includes this snippet:

    if dpkg --compare-versions "$2" lt 2.4.0-1; then
    printf "Cleaning up old fontconfig caches... "
    for dir in /usr/share/fonts /var/lib/defoma/fontconfig.d   /usr/X11R6/lib/X11/fonts /usr/local/share/fonts ; do
          if [ -d $dir ]; then
              find $dir -name fonts.cache-1 -exec rm -f \{\} \;
              find $dir -depth -mindepth 1 -type d -exec rmdir --ignore-fail-on-non-empty \{\} \;
          fi
    done
    ...

  This block gets run when fontconfig is initially installed, as well as
  when upgrading from fontconfig (<< 2.4.0-1). This interacts poorly
  with Ubuntu's ttf-mscorefonts-installer package, which includes an
  empty /usr/share/fonts/truetype/msttcorefonts directory and writes
  files to that directory in the postinst. If you install fontconfig and
  ttf-mscorefonts-installer in the same apt run, the directory will get
  unpacked, fontconfig's postinst will rmdir it, and ttf-mscorefont-
  installer's postinst will get really confused.

  I proposed to Debian that it would suffice to just use "lt-nl" instead of "lt", so that an empty $2 (a new install) causes dpkg 
  --compare-versions to return false. That way the cleanup code only runs on upgrade from the old version of fontconfig, where it is presumably actually needed, and not on first install.

  For more context, see
  https://bugs.launchpad.net/ubuntu/+source/msttcorefonts/+bug/670629
  comments 14 (which prompted packaging the empty directory) and 29
  http://debathena.mit.edu/trac/ticket/975
  comments "Pretty sure this is entirely different..." and "Anders and I found the bug..."

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/819097/+subscriptions




More information about the foundations-bugs mailing list