Really add the correct preinst file
Christian Perrier
14 years ago
|
0 |
ttf-arabeyes (2.0-6) UNRELEASED; urgency=low
|
|
1 |
|
|
2 |
* Add preinst script to remove the leftover defoma hints file (this should
|
|
3 |
have been done in the former release but a failure to "svn add" the file
|
|
4 |
lead to it be omitted
|
|
5 |
|
|
6 |
-- Christian Perrier <bubulle@debian.org> Tue, 24 Nov 2009 22:21:39 +0100
|
|
7 |
|
0 | 8 |
ttf-arabeyes (2.0-5) unstable; urgency=low
|
1 | 9 |
|
2 | 10 |
* Rebuild with new defoma to avoid #557321
|
|
0 |
#!/bin/sh
|
|
1 |
|
|
2 |
set -e
|
|
3 |
|
|
4 |
|
|
5 |
# Remove a no-longer used conffile
|
|
6 |
rm_conffile() {
|
|
7 |
PKGNAME="$1"
|
|
8 |
CONFFILE="$2"
|
|
9 |
|
|
10 |
if [ -e "$CONFFILE" ]; then
|
|
11 |
md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
|
|
12 |
old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`"
|
|
13 |
if [ "$md5sum" != "$old_md5sum" ]; then
|
|
14 |
echo "Obsolete conffile $CONFFILE has been modified by you."
|
|
15 |
echo "Saving as $CONFFILE.dpkg-bak ..."
|
|
16 |
mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
|
|
17 |
else
|
|
18 |
echo "Removing obsolete conffile $CONFFILE ..."
|
|
19 |
rm -f "$CONFFILE"
|
|
20 |
fi
|
|
21 |
fi
|
|
22 |
}
|
|
23 |
|
|
24 |
|
|
25 |
VERSION=2.0-4
|
|
26 |
FILE=/etc/defoma/hints/ttf-arabeyes.hints
|
|
27 |
if [ "$1" = remove ] && dpkg --compare-versions "$2" lt-nl $VERSION;
|
|
28 |
then
|
|
29 |
if [ -x /usr/bin/defoma-font ]; then
|
|
30 |
defoma-font purge-all $FILE
|
|
31 |
fi
|
|
32 |
rm_conffile $FILE
|
|
33 |
fi
|