Hi,

On Wed, Apr 06, 2011 at 11:44:17AM +0200, S Berder wrote:
> Package: nsd3
> Version: 3.2.5-1
> Severity: important
> 
> When using 'apt-get remove --purge nsd3', the /var/lib/dpkg/statoverride file 
> is left in an unstable state.
> Reproduced the problem several times by installing the package and 
> removing/purging it.
> After the remove/purge, any further install fails.
> 
> After 'apt-get remove --purge nsd3' :
> # cat /var/lib/dpkg/statoverride
> 
> nsd nsd 755 /var/lib/nsd3
> nsd nsd 750 /etc/nsd3
> nsd nsd 640 /etc/nsd3/nsd.conf
> [...]
> # apt-get install package
> [...]
> Preconfiguring packages ...
> dpkg: unrecoverable fatal error, aborting:
>  syntax error: unknown user 'nsd' in statoverride file
> E: Sub-process /usr/bin/dpkg returned an error code (2)

This is because the postrm script removes the nsd user before it
removes the stat overrides.

Attached patch fixes this (and also suppresses a spurious warning when
/var/lib/nsd3 was empty and thus automatically removed).

Would this be a candidate for proposed-updates as it fixes an
installability bug?

Regards,
-- 
Jeroen Schot
--- debian/postrm.orig	2011-03-30 14:13:56.000000000 +0200
+++ debian/postrm	2011-04-07 14:35:40.000000000 +0200
@@ -8,13 +8,14 @@
 
 if test "$1" = "purge"; then
     spool=/var/lib/nsd3
-    deluser --quiet nsd > /dev/null || true
     rm -f $spool/nsd.db $spool/ixfr.db $spool/xfrd.state
-    rmdir $spool || true
+    rmdir $spool 2>/dev/null || true
 
     unset_perms /var/lib/nsd3
     unset_perms /etc/nsd3/nsd.conf
     unset_perms /etc/nsd3
+
+    deluser --quiet nsd > /dev/null || true
 fi
 
 exit 0

Attachment: signature.asc
Description: Digital signature

Reply via email to