tags 657751 + patch thanks The issue seems to be that userdel doesn't allow removal when a user is still in use and gdm3 uses the Debian-gdm user to run parts of itself.
The prerm already tries to stop gdm3 when there is no user logged in and in this case it seems that there is a user logged in so it doesn't stop. Killing an active user session doesn't seem to be appropriate, especially since it could be controlling the dpkg/apt process running the postrm script. However, that is all moot because the postrm script should not fail since it ignores any success/failure of deluser. It appears the stdout and stderr of userdel is leaking into the code that purges info from the debconf db. Obviously that output is not a valid command stream for db_purge so it fails. If we load the debconf confmodule before generating any output, then the code in the debconf confmodule will handle redirecting stdout/stderr correctly so that there are no failures, patch below: --- gdm3-3.0.4/debian/gdm3.postrm +++ gdm3-3.0.4/debian/gdm3.postrm @@ -1,6 +1,13 @@ #!/bin/sh set -e +# Need to load this before any output on stdout/stderr +# otherwise the debconf command-stream will get +# some invalid input and cause the failure of postrm. +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + if [ "$1" = "purge" ] ; then update-rc.d gdm3 remove >/dev/null if [ -d /etc/gdm3 ]; then -- bye, pabs http://wiki.debian.org/PaulWise
signature.asc
Description: This is a digitally signed message part