Bug#589851: aspell-bg: Broken after upgrade from lenny or after reinstalling the package

2010-07-23 Thread Yavor Doganov
tags 589851 + patch pending
thanks

On Wed, Jul 21, 2010 at 06:56:14PM +0300, Yavor Doganov wrote:
 Upgrading from 3.0-9 or simply doing `aptitude reinstall aspell-bg'
 results in the removal of the files /var/lib/aspell/bg{,-en}.rws,

It seems this is done unconditionally in postrm.  The attached patch
works for me; I'll do some more cleanups (lintian warnings, etc.)
before seeking a sponsor.

Since the version in Lenny is also affected, I'll also prepare a
minimalistic pu upload and will ask the release team for their
opinion whether a stable update is warranted.
reverted:
--- bgoffice-3.0/debian/aspell-bg.postrm
+++ bgoffice-3.0.orig/debian/aspell-bg.postrm
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case $1 in
-purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-DIR=/var/lib/aspell
-	rm -f $DIR/bg.compat $DIR/bg-en.rws $DIR/bg.rws
-	;;
-
-*)
-echo postrm called with unknown argument '$1' 2
-	exit 1
-;;
-esac
-
-
-#DEBHELPER#
-
-exit 0
-
diff -u bgoffice-3.0/debian/rules bgoffice-3.0/debian/rules
--- bgoffice-3.0/debian/rules
+++ bgoffice-3.0/debian/rules
@@ -102,6 +102,9 @@
 # $WORDLIST is the wordlist filename minus the .*wl.gz extension)
 	install -d debian/aspell-bg/var/lib/aspell/
 	debian/aspell-bg/var/lib/aspell/bg.rws
+# Make sure dpkg knows about bg-en.rws too, otherwise the file is not
+# deleted upon remove/purge.
+	debian/aspell-bg/var/lib/aspell/bg-en.rws
 # Add a symlink /usr/lib/aspell/$WORDLIST.rws - /var/lib/aspell/$WORDLIST.rws
 	install -d debian/aspell-bg/usr/lib/aspell/
 	ln -s /var/lib/aspell/bg.rws debian/aspell-bg/usr/lib/aspell/bg.rws
diff -u bgoffice-3.0/debian/aspell-bg.postinst bgoffice-3.0/debian/aspell-bg.postinst
--- bgoffice-3.0/debian/aspell-bg.postinst
+++ bgoffice-3.0/debian/aspell-bg.postinst
@@ -9,6 +9,12 @@
 	bulgarian-aspell-dictionary $DIR/bg-w_english.multi 60
 update-alternatives --install $DIR/bg.multi \
 	bulgarian-aspell-dictionary $DIR/bg-wo_english.multi 40
+	# Touch the files deleted by old postrm (#589851).
+	# FIXME: Remove this snippet post-squeeze.
+	DIRV=/var/lib/aspell
+	for f in $DIRV/bg.rws $DIRV/bg-en.rws $DIRV/bg.compat; do
+	[ -f $f ] || touch $f;
+	done
 	;;
 
 abort-upgrade|abort-remove|abort-deconfigure)
diff -u bgoffice-3.0/debian/changelog bgoffice-3.0/debian/changelog
--- bgoffice-3.0/debian/changelog
+++ bgoffice-3.0/debian/changelog
@@ -1,3 +1,14 @@
+bgoffice (3.0-11) unstable; urgency=medium
+
+  * QA upload.
+  * debian/aspell-bg.postrm: Delete; harmful during upgrades or package
+reinstallation (Closes: #589851).
+  * debian/aspell-bg.postinst: Recover from the old erroneous postrm and
+touch bg{,-en}.rws and bg.compat if the files do not exist.
+  * debian/rules (install): Create an empty var/lib/aspell/bg-en.rws.
+
+ -- Yavor Doganov ya...@gnu.org  Fri, 23 Jul 2010 12:07:46 +0300
+
 bgoffice (3.0-10) unstable; urgency=low
 
   * QA upload.


Bug#589851: aspell-bg: Broken after upgrade from lenny or after reinstalling the package

2010-07-21 Thread Yavor Doganov
Package: aspell-bg
Version: 3.0-10
Severity: serious

Upgrading from 3.0-9 or simply doing `aptitude reinstall aspell-bg'
results in the removal of the files /var/lib/aspell/bg{,-en}.rws,
making the correspondent symlinks in /usr/lib/aspell dangling.

This makes the package completely unusable.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages aspell-bg depends on:
ii  aspell0.60.6-4   GNU Aspell spell-checker

aspell-bg recommends no packages.

aspell-bg suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org