Package: uptimed Version: 1:0.3.16-3.1 Severity: normal Tags: patch On a clean system, installing and then purging uptimed failed because of the leftover /var/spool/uptimed/records.old file making rmdir /var/spool/uptimed fail....
See attached patch for fix. -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (300, 'unstable'), (100, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-1-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages uptimed depends on: ii debconf [debconf-2.0] 1.5.41 Debian configuration management sy ii libc6 2.13-13 Embedded GNU C Library: Shared lib ii libuptimed0 1:0.3.16-3.1 Library for uptimed uptimed recommends no packages. uptimed suggests no packages. -- Configuration Files: /etc/init.d/uptimed.sh [Errno 2] No such file or directory: u'/etc/init.d/uptimed.sh' /etc/uptimed.conf changed [not included] -- debconf information excluded
>From b30b76be7106360b128d6e39f7fa78301b8ee2cf Mon Sep 17 00:00:00 2001 From: Andreas Henriksson <andr...@fatal.se> Date: Thu, 4 Aug 2011 12:13:17 +0200 Subject: [PATCH] fix uptimed purge failure After installing uptimed on a clean system and then trying to purge it again, the purge failed and left the packaging system in limbo... The reason for the failure was because of the fatal rmdir operation that failed because purge forgot to remove the file /var/spool/uptimed/records.old ... This changes purge to remove records.old and to make the rmdir operation non-fatal.... (While at it, skip the useless check for existance before rm -f which will not fail anyway for bootid file.) --- debian/uptimed.postrm | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/uptimed.postrm b/debian/uptimed.postrm index 05c55dd..8c60f08 100644 --- a/debian/uptimed.postrm +++ b/debian/uptimed.postrm @@ -8,10 +8,9 @@ if [ "$1" = "purge" ]; then rm -f /var/spool/uptimed/records echo "done." fi - if [ -f /var/spool/uptimed/bootid ]; then - rm -f /var/spool/uptimed/bootid - fi + rm -f /var/spool/uptimed/records.old + rm -f /var/spool/uptimed/bootid if [ -d /var/spool/uptimed ]; then - rmdir /var/spool/uptimed + rmdir /var/spool/uptimed || true fi fi -- 1.7.5.4