Package: ttf-jsmath
Version: 0.01-3
Severity: minor
Tags: patch

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

Hi,

 Thanks for dropping defoma hints file from your package.

 And it makes sure removing hints file if preinst script would check 
 and delete it. Please check attached preinst script that used in
 other ttf-* packages.

 Thanks.

- -- 
Regards,

 Hideki Yamane

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

iEYEARECAAYFAkuQKXQACgkQIu0hy8THJkvbjgCfdd51gQ+i4lwXeaDXYqq0/WjX
71IAoJuuusNewhEM5CPHZIJ7jHhSfwYv
=8dIp
-----END PGP SIGNATURE-----
#!/bin/sh
#
# delete /etc/defoma/ttf-jsmath.hints before before 0.01-2

set -e

PKG="ttf-jsmath"
PKG_VERSION="0.01-2"

rm_conffile() {
  PKGNAME="$1"
  CONFFILE="$2"
  if [ -e "$CONFFILE" ]; then
   md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
   old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`"
   if [ "$md5sum" != "$old_md5sum" ]; then
     echo "Obsolete conffile $CONFFILE has been modified by you."
     echo "Saving as $CONFFILE.dpkg-bak ..."
     mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
   else
     echo "Removing obsolete conffile $CONFFILE ..."
     rm -f "$CONFFILE"
   fi
 fi
}

case "$1" in
install|upgrade)
  if dpkg --compare-versions "$2" lt-nl "$PKG_VERSION"; then
      FILE="/etc/defoma/hints/${PKG}.hints"
      if [ -f $FILE ]; then
          if [ -x /usr/bin/defoma-font ]; then
	      defoma-font purge-all $FILE || true
	  fi
      fi
      rm_conffile $PKG $FILE
  fi
esac

#DEBHELPER#
exit 0

Reply via email to