Package: deluge
Version: 1.3.5-0ubuntu1
Severity: normal

Upstream tried to push a version with the new init script to their PPA. They
got a lot of user error reports when upgrading the new version:

Setting up deluged (1.3.5-0~lucid~ppa1) ...
dpkg-statoverrides: An override for '/var/log/deluged' already exists,
aborting.
dpkg: error processing deluged (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 deluged
E: Sub-process /usr/bin/dpkg returned an error code (1)

We need to be checking for dpkg-statoverrides before adding in the postinst to
keep this from happening on upgrades. This hasn't popped up in Debian yet as
there has only been one version with the init script.

Patch attached.

Thanks,

- Andrew Starr-Bochicchio



-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-security
  APT policy: (990, 'precise-security'), (900, 'precise-updates'), (500, 
'precise'), (400, 'precise-proposed'), (100, 'precise-backports')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-24-generic-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages deluge depends on:
ii  deluge-gtk         1.3.5-0ubuntu1
ii  python             2.7.3-0ubuntu2
ii  python-libtorrent  0.15.10-1

deluge recommends no packages.

deluge suggests no packages.

-- no debconf information
diff --git a/debian/deluged.postinst b/debian/deluged.postinst
index b064a99..4b2e0aa 100644
--- a/debian/deluged.postinst
+++ b/debian/deluged.postinst
@@ -8,7 +8,9 @@ case "$1" in
       adduser --system --group --quiet --no-create-home --home /var/lib/deluged debian-deluged
     fi
 
+    dpkg-statoverride --list /var/log/deluged >/dev/null || \
     dpkg-statoverride --update --add debian-deluged adm 2750 /var/log/deluged
+    dpkg-statoverride --list /var/lib/deluged/config >/dev/null || \
     dpkg-statoverride --update --add debian-deluged debian-deluged 0750 /var/lib/deluged/config
     ;;
 esac

Reply via email to