Bug#766308: Fails to purge: /var/lib/dpkg/info/mdadm.postrm: 9: /usr/share/debconf/confmodule: DEBIAN_HAS_FRONTEND: parameter not set

Anthony DeRobertis anthony at derobert.net
Wed Oct 22 04:26:16 UTC 2014


Package: mdadm
Version: 3.3.2-2
Severity: serious

SUMMARY: "set -u" breaks debconf. You can't have it in effect in your
postrm when sourcing it.

DETAILS:

root at Heisenberg:~# dpkg --purge mdadm
(Reading database ... 313312 files and directories currently installed.)
Removing mdadm (3.3.2-2) ...
Purging configuration files for mdadm (3.3.2-2) ...
/var/lib/dpkg/info/mdadm.postrm: 9: /usr/share/debconf/confmodule: DEBIAN_HAS_FRONTEND: parameter not set
dpkg: error processing package mdadm (--purge):
 subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
 mdadm
root at Heisenberg:~#

Adding set -x to the top of the postrm (editing the file in
/var/lib/dpkg/info), shows that it's blowing up here:

   # Automatically added by dh_installdebconf
   if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
--->       . /usr/share/debconf/confmodule   <---
           db_purge
   fi

And that's because you have "set -ue" at the top of the script, the -u
being the problem. Once I remove that, the package purges successfully.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (150, 'unstable'), (125, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-3-amd64 (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 mdadm depends on:
ii  debconf      1.5.53
ii  initscripts  2.88dsf-53.4
ii  libc6        2.19-11
ii  lsb-base     4.1+Debian13
ii  udev         215-5+b1

Versions of packages mdadm recommends:
ii  exim4-daemon-light [mail-transport-agent]  4.84-2
ii  module-init-tools                          18-3

mdadm suggests no packages.



More information about the pkg-mdadm-devel mailing list