[Pkg-lyx-devel] [SCM] LyX packaging branch, master, updated. b514c8bcdd9fbbdcc85e8c8fe0f7c82fe8385a24

Per Olofsson pelle at dsv.su.se
Sat Jul 18 09:53:28 UTC 2009


The following commit has been merged in the master branch:
commit fc534bf89cc5139df3ce3166f58dcfcd6bf93f5a
Author: Per Olofsson <pelle at dsv.su.se>
Date:   Sat Jul 18 11:48:52 2009 +0200

    Delete old conffile /etc/defoma/hints/latex-xft-fonts.hints from preinst.

diff --git a/debian/changelog b/debian/changelog
index 9bcbe6a..32d6dd5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ lyx (1.6.3-3) UNRELEASED; urgency=low
 
   * Add Section: fonts to ttf-lyx.
   * Add latex-xft-fonts transitional package.
+    - Delete old conffile /etc/defoma/hints/latex-xft-fonts.hints from
+      preinst.
   * Make a symlink from /usr/share/doc/latex-xft-fonts to ttf-lyx. Saves
     space.
   * Add patch fix-manpage-errors which fixes errors in tex2lyx(1).
diff --git a/debian/latex-xft-fonts.preinst b/debian/latex-xft-fonts.preinst
new file mode 100644
index 0000000..fe40095
--- /dev/null
+++ b/debian/latex-xft-fonts.preinst
@@ -0,0 +1,31 @@
+#!/bin/sh
+set -e
+
+# Remove a no-longer used conffile
+rm_conffile() {
+	local PKGNAME="$1"
+	local CONFFILE="$2"
+
+	[ -e "$CONFFILE" ] || return 0
+
+	local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
+	local 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
+}
+
+case "$1" in
+install|upgrade)
+	if dpkg --compare-versions "$2" le "0.1-8"; then
+		rm_conffile latex-xft-fonts \
+			/etc/defoma/hints/latex-xft-fonts.hints
+	fi
+esac
+
+#DEBHELPER#

-- 
LyX packaging



More information about the Pkg-lyx-devel mailing list