Followup-For: Bug #679590
Control: tags -1 patch

On 2012-07-30 04:30, Marco d'Itri wrote:
> On Jun 30, Andreas Beckmann <deb...@abeckmann.de> wrote:
>>   Purging configuration files for binkd ...
>>   rmdir: failed to remove `/var/log/binkd/': No such file or
>>   directory
> How can /var/log/binkd/ not exist since it is part of the package?

If /var/log/binkd was empty during remove, dpkg already removed the
directory, so it is no longer there when purge is run.

Manually removing the directory in postrm purge should become superfluous
with post-wheezy dpkg as there is a patch pending to retry removing
directories after postrm purge may have cleaned up stuff in there.

I'm attaching a trivial patch that would fix this for wheezy and will
ask the RT for pre-approval. I'd NMU binkd if this is approved by the
RT.


Andreas
diff -Nru binkd-0.9.11/debian/binkd.postrm binkd-0.9.11/debian/binkd.postrm
--- binkd-0.9.11/debian/binkd.postrm	2012-05-21 03:52:15.000000000 +0200
+++ binkd-0.9.11/debian/binkd.postrm	2013-03-16 10:53:45.000000000 +0100
@@ -1,8 +1,9 @@
-#!/bin/sh -e
+#!/bin/sh
+set -e
 
 if [ "$1" = purge ]; then
   rm -f /var/log/binkd/binkd*
-  rmdir --ignore-fail-on-non-empty /var/log/binkd/
+  rmdir --ignore-fail-on-non-empty /var/log/binkd/ 2>/dev/null || true
 fi
 
 #DEBHELPER#
diff -Nru binkd-0.9.11/debian/changelog binkd-0.9.11/debian/changelog
--- binkd-0.9.11/debian/changelog	2012-06-29 03:27:33.000000000 +0200
+++ binkd-0.9.11/debian/changelog	2013-03-16 11:09:09.000000000 +0100
@@ -1,3 +1,10 @@
+binkd (0.9.11-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Do not fail to purge if /var/log/binkd does not exist.  (Closes: #679590)
+
+ -- Andreas Beckmann <a...@debian.org>  Sat, 16 Mar 2013 10:53:51 +0100
+
 binkd (0.9.11-1) unstable; urgency=low
 
   * New upstream release, with minor bug fixes.

Reply via email to