[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

debconf making package removal fail because of warnings issues by an earlier called program (in postrm)



CCing debian-devel

Hi,

An issue has been brought to my attention and I wonder, if this is a bug
or the intended behaviour. For reference see
https://bugs.launchpad.net/medibuntu/+bug/290621.

In this case a package should be removed. In its postrm it calls
update-mime-database, update-mime and some snippet by dh_installdebconf:

> #!/bin/sh
> set -ex
> # Automatically added by dh_installmime
> if [ -x "`which update-mime-database 2>/dev/null`" ]; then
>         update-mime-database /usr/share/mime
> fi
> # End automatically added section
> # Automatically added by dh_installmime
> if which update-mime >/dev/null 2>&1; then update-mime; fi
> # End automatically added section
> # Automatically added by dh_installdebconf
> if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
>         . /usr/share/debconf/confmodule
>         db_purge
> fi
> # End automatically added section

Now one of the packages installed registered some MIME types with
unregistered media types (in this case chemical-mime-data, but kde4 and
some other packages do this too). So update-mime-database issues some
warnings:

> Unknown media type in type '...'

(there is already an upstream bug report to not be that verbose here).
And it seems, that this output "pollutes" debconf input:

> + db_purge
> + _db_cmd PURGE
> + IFS= printf %s\n PURGE
> + IFS=
>  read -r _db_internal_line
> + RET=20 Unsupported command "unknown" (full line was "Unknown media
> type in type 'chemical/x-alchemy'") received from confmodule.
> + return 20

The policy does not say, that programs called in the maintainer scripts
are not allowed to be verbose or to issue warnings. There is a should
but not a must to avoid this (3.9). But output seems to make debconf
script(s) fail.

I did not yet file a bug report. I want to hear some opinions first.
Maybe I'm wrong with my opinion.

Regards, Daniel


Reply to: