[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#197153: marked as done (xutils: update-fonts-alias should skip removed-but-not-purged packages)



Your message dated Mon, 30 Apr 2007 02:07:28 +0200
with message-id <46353340.9030906@ens-lyon.org>
and subject line ping timeout, closing
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: xutils
Severity: normal

When a font package is removed but not purged its configuration files
stay in /etc/X11/fonts and cause false fonts.alias and fonts.scale
items.  A patches for update-fonts-scale and update-fonts-alias are
attached.

Anton Zinoviev


--- update-fonts-scale.old	2003-06-08 15:29:51.000000000 +0300
+++ update-fonts-scale.new	2003-06-08 16:18:23.000000000 +0300
@@ -52,12 +52,19 @@
     fi
   done
   if [ -n "$VALID" ]; then
+    > $XDIR/fonts.scale.update-tmp
     # are there any files to process?
     if [ "$(echo $ETCDIR/*.scale)" != "$ETCDIR/*.scale" ]; then
       for file in $ETCDIR/*.scale; do
-        # omit count at top of file
-        tail +2 $file >> $XDIR/fonts.scale.update-tmp
+        package=`basename $file .scale`
+        if [ -e /usr/share/doc/$package ]; then
+          # omit count at top of file
+          tail +2 $file >> $XDIR/fonts.scale.update-tmp
+        fi
       done
+    fi
+    # Was there a processed file?
+    if [ -s $XDIR/fonts.scale.update-tmp ]; then
       # write new scale file in case we are interrupted
       # write new count to top of file
       # cat and pipe to wc so wc doesn't spew the filename
@@ -66,7 +73,8 @@
       mv $XDIR/fonts.scale.update-new $XDIR/fonts.scale
       rm $XDIR/fonts.scale.update-tmp
     else
-      # no files to process, remove the one in the font dir
+      # no files processed
+      rm -f $XDIR/fonts.scale.update-tmp
       rm -f $XDIR/fonts.scale
       # remove the font dir if it is empty
       rmdir $XDIR > /dev/null 2>&1 || true
--- update-fonts-alias.old	2003-06-08 15:30:12.000000000 +0300
+++ update-fonts-alias.new	2003-06-08 16:18:07.000000000 +0300
@@ -52,20 +52,30 @@
     fi
   done
   if [ -n "$VALID" ]; then
+    > $XDIR/fonts.alias.update-tmp 
     # are there any files to process?
     if [ "$(echo $ETCDIR/*.alias)" != "$ETCDIR/*.alias" ]; then
+      for file in $ETCDIR/*.alias; do
+        package=`basename $file .alias`
+        if [ -e /usr/share/doc/$package ]; then
+          echo "!! $file" >> $XDIR/fonts.alias.update-tmp
+          cat $file >> $XDIR/fonts.alias.update-tmp
+        fi
+      done
+    fi
+    # Was there a processed file?
+    if [ -s $XDIR/fonts.alias.update-tmp ]; then
       # write new alias file in case we are interrupted
       cat > $XDIR/fonts.alias.update-new << EOF
 !! fonts.alias -- automatically generated file.  DO NOT EDIT.
 !! To modify, see update-fonts-alias(8).
 EOF
-      for file in $ETCDIR/*.alias; do
-        echo "!! $file" >> $XDIR/fonts.alias.update-new
-        cat $file >> $XDIR/fonts.alias.update-new
-      done
+      cat $XDIR/fonts.alias.update-tmp >> $XDIR/fonts.alias.update-new
       mv $XDIR/fonts.alias.update-new $XDIR/fonts.alias
+      rm $XDIR/fonts.alias.update-tmp
     else
-      # no files to process, remove the one in the font dir
+      # no files processed
+      rm -f $XDIR/fonts.alias.update-tmp
       rm -f $XDIR/fonts.alias
       # remove the font dir if it is empty
       rmdir $XDIR > /dev/null 2>&1 || true

--- End Message ---
--- Begin Message ---
Closing this bug since I didn't get any reply from the submitter after
my ping about a month ago. If anybody ever reproduces this problem, feel
free to reopen.

Brice


--- End Message ---

Reply to: