chiark / gitweb /
more packaging
[xfonts-traditional] / debian / xfonts-traditional.prerm
diff --git a/debian/xfonts-traditional.prerm b/debian/xfonts-traditional.prerm
new file mode 100644 (file)
index 0000000..4dc7f2c
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+set -e
+
+. /usr/share/debconf/confmodule
+
+case "$1" in
+
+remove)
+
+       echo 'Checking that "fixed" is not from xfonts-traditional..."
+
+       if grep '^fixed[         ][      ]*-trad-'; then
+               cat >&2 <<END
+You should not remove xfonts-traditional while "fixed" refers to one
+of its fonts.  You probably want to check the differences between
+/etc/X11/fonts/misc/xfonts-base.alias and xfonts-base.alias.not-trad,
+and probably replace the former with the latter, and retry the removal.
+END
+               exit 1
+       fi
+
+       ;;
+
+       find /usr/share/fonts/X11 /usr/local/share/fonts/X11 \
+                  -type f \
+               \( -name xfonts-traditional.log -o \
+                  -name xfonts-traditional.done -o 
+                  -name xfonts-traditional.done.new -o 
+                  -name trad--\*.pcf.gz.new \) \
+               -print0 | xargs -0r rm
+
+       find /usr/share/fonts/X11 /usr/local/share/fonts/X11 \
+                  -type f \
+                  -name trad--\*.pcf.gz \
+               -print0 | xargs -0r rm
+
+esac