clone 608522 -1 reassign -1 dpkg 1.15.8.7 retitle -1 triggering a package calls .config script with bad arguments tag 608522 pending thanks
Hello Christoph, Christoph Berg [2010-12-31 21:35 +0100]: > when installing myspell dictionaries, postgresql-common gets triggered > to rebuild the postgres dictionaries. This makes dpkg > --compare-versions print a warning about a bad version. > > With set -ex ; echo "$@" in > /var/lib/dpkg/info/postgresql-common.config: > > $ LC_ALL=C sudo dpkg -i > /var/cache/apt/archives/myspell-de-de_20091006-4.2_all.deb > (Reading database ... 194663 files and directories currently installed.) > Preparing to replace myspell-de-de 20091006-4.2 (using > .../myspell-de-de_20091006-4.2_all.deb) ... > Unpacking replacement myspell-de-de ... > Setting up myspell-de-de (20091006-4.2) ... > Processing triggers for postgresql-common ... > + echo configure /usr/share/myspell/dicts That's the root of the problem. It seems that dpkg calls a package's .config script on a trigger. Should that really happen? If packages are meant to be able to call debconf on triggers, then this would be correct, but if $2 shold really be the name of the trigger (as opposed to the usual version number, as defined by the Debian Policy), then at least $1 shouldn't be "configure" but perhaps "triggered"? > The bad code is: > > # at some points we obsolete major versions within unstable; force the > # obsoletion notifications when upgrading over those > if dpkg --compare-versions "$2" lt-nl 71; then > db_fset postgresql-common/obsolete-major seen false > fi > > I'm not sure how one is supposed to test version numbers in the config > script, but at least that code shouldn't run when triggered. That's true, but right now I can't tell. I committed a simple workaround to postgresql-common (silencing stderr), but cloned the bug against dpkg so that we can discuss/fix the underlying problem. Thank you, and happy new year! Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
signature.asc
Description: Digital signature