[Pkg-telepathy-maintainers] Bug#825134: ofono: Fails to uninstall

Axel Beckert abe at debian.org
Mon May 23 22:12:44 UTC 2016


Package: ofono
Version: 1.15-3
Severity: serious
Tags: patch

Dear Maintainer,

trying to purge ofono fails as follows for me:

Removing ofono (1.15-3) ...
[....] Stopping Bluetooth DUN daemon: dundeeTerminated
invoke-rc.d: initscript dundee, action "stop" failed.
dpkg: error processing package ofono (--purge):
 subprocess installed pre-removal script returned error exit status 143
[ ok ] Starting Bluetooth DUN daemon: dundee.
[ ok ] Starting oFono Mobile Telephony Daemon: ofonod.
Errors were encountered while processing:
 ofono

The dundee daemon seems to be stopped and started fine with
/etc/init.d/dundee stop and /etc/init.d/dundee start, just the return
value of when stopping seems to be unexpected.

Adding a "set -x" to the init script shows the following:

# /etc/init.d/dundee stop
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/dundee
+ NAME=dundee
+ DESC=Bluetooth DUN daemon
+ test -x /usr/sbin/dundee
+ . /lib/lsb/init-functions
+ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
+ [ -r /lib/lsb/init-functions.d/01-upstart-lsb ]
+ . /lib/lsb/init-functions.d/01-upstart-lsb
+ unset UPSTART_SESSION
+ _RC_SCRIPT=/etc/init.d/dundee
+ [ -r /etc/init//etc/init.d/dundee.conf ]
+ _UPSTART_JOB=dundee
+ [ -r /etc/init/dundee.conf ]
+ [ -r /lib/lsb/init-functions.d/20-left-info-blocks ]
+ . /lib/lsb/init-functions.d/20-left-info-blocks
+ [ -r /lib/lsb/init-functions.d/40-systemd ]
+ . /lib/lsb/init-functions.d/40-systemd
+ _use_systemctl=0
+ [ -d /run/systemd/system ]
+ [ 0 = 1 ]
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ true
+ [ -f /etc/default/dundee ]
+ log_daemon_msg Stopping Bluetooth DUN daemon dundee
+ [ -z Stopping Bluetooth DUN daemon ]
+ log_daemon_msg_pre Stopping Bluetooth DUN daemon dundee
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xscreen.xterm-256color != x ]
+ [ xscreen.xterm-256color != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z ]
+ FANCYTTY=1
+ true
+ echo -n [....] 
[....] + [ -z dundee ]
+ echo -n Stopping Bluetooth DUN daemon: dundee
Stopping Bluetooth DUN daemon: dundee+ log_daemon_msg_post Stopping Bluetooth DUN daemon dundee
+ :
+ do_stop
+ start-stop-daemon --stop --quiet --oknodo --name dundee
Terminated
# echo $?
143
#

The exit code seems independent of if dundee is running or not.

The problem seems the usage of "--name dundee". Because that also
matches /etc/init.d/dundee, i.e. start-stop-daemon also kills the init
script.

The following patch against the init script fixes this issue:

--- /etc/init.d/dundee~ 2016-05-24 00:07:07.000000000 +0200
+++ /etc/init.d/dundee  2016-05-24 00:10:37.250902070 +0200
@@ -31,7 +31,7 @@
 
 do_stop()
 {
-       start-stop-daemon --stop --quiet --oknodo --name $NAME
+       start-stop-daemon --stop --quiet --oknodo --exec $DAEMON
 }
 
 case "$1" in

-- System Information:
Debian Release: stretch/sid
Architecture: amd64 (x86_64)

Kernel: Linux 4.6.0-trunk-amd64 (SMP w/8 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages ofono depends on:
ii  dbus                 1.10.8-1
ii  init-system-helpers  1.33
ii  libc6                2.22-9
ii  libdbus-1-3          1.10.8-1
ii  libglib2.0-0         2.48.1-1
ii  libudev1             230-1

Versions of packages ofono recommends:
ii  udev  230-1

ofono suggests no packages.

-- no debconf information



More information about the Pkg-telepathy-maintainers mailing list