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

Bug#133446: dpkg: update-alternatives exits with 1

On 11/02/02, dvorak wrote:
> There is one related bug report being:
> #133033: post installation exits with status 1
> about the exuberant-ctags package exiting because of the 1 exit code in
> combination with set -e.

> I quick grep of postinst scripts lists quite some more packages that might
> suffer from this problem (vim being one of them).

> I think the correct solution is to exit with a 0 exit code at the moment
> that the alternative doesn't exist.  (a patch for this solution is attached)

I'm not one of the dpkg authors or maintainers, but may I still ask why
you didn't look into the changelog for dpkg before writing this bug
report? Look at this excerpt:

|  * update-alternative exits with a non-zero exit code when displaying
|    a non-existing alternative. Closes: Bug#131496

So this behaviour was introduced due to a bug report against dpkg and
looking at the bugreport it sounds like good solution. Instead of
applying the patch you suggest to change this bug and therefor reopen
the bug that was just closed, I think the new exit value should be
documented and the maintainer scripts changed to not only handle well
defined exit values of update-alternatives but cope with all exit codes.

           Debian Developer (http://www.debian.org)
1024D/B7CEC7E8 44BD 1F9E A997 3BE2 A44F  96A4 1C98 EEF3 B7CE C7E8

Attachment: pgpV6q1pajGcj.pgp
Description: PGP signature

Reply to: