Your message dated Tue, 12 Feb 2002 02:39:49 -0600 (CST)
with message-id <[EMAIL PROTECTED]>
and subject line Bug#133446: dpkg: update-alternatives exits with 1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 11 Feb 2002 19:40:00 +0000
>From [EMAIL PROTECTED] Mon Feb 11 13:40:00 2002
Return-path: <[EMAIL PROTECTED]>
Received: from mxzilla4.xs4all.nl [194.109.6.48] 
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 16aMIy-0007Z9-00; Mon, 11 Feb 2002 13:40:00 -0600
Received: from xs4.xs4all.nl ([EMAIL PROTECTED] [194.109.6.45])
        by mxzilla4.xs4all.nl (8.12.0/8.12.0) with ESMTP id g1BJdxlX090971
        for <[EMAIL PROTECTED]>; Mon, 11 Feb 2002 20:39:59 +0100 (CET)
Received: from localhost ([EMAIL PROTECTED])
        by xs4.xs4all.nl (8.9.0/8.9.0) with ESMTP id UAA17433
        for <[EMAIL PROTECTED]>; Mon, 11 Feb 2002 20:39:59 +0100 (CET)
Date: Mon, 11 Feb 2002 20:39:58 +0100 (CET)
From: dvorak <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: dpkg: update-alternatives exits with 1
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Delivered-To: [EMAIL PROTECTED]

Package: dpkg
Version: 1.9.19
Severity: normal

Basicly the manpage for update-alternatives states 0 and 2 as possible exit
codes. How ever it's possible that update-alternatives returns 1.
for instance when asking for information about a non existing alternative

update-alternatives --display someone-completely-unrelated

At the moment it seems this is an inconsistency between the man page and
the program. But certain programs seems to rely on update-alternatives not
returning anything else then 0 (post install scripts of various packages)

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)

-- System Information
Debian Release: 3.0
Kernel Version: Linux oi 2.2.20 #2 Sun Feb 10 14:49:53 CET 2002 i686 unknown

Versions of the packages dpkg depends on:
ii  libc6          2.2.5-3        GNU C Library: Shared libraries and Timezone
ii  libncurses5    5.2.20020112a- Shared libraries for terminal handling
ii  libstdc++2.10- 2.95.4-2       The GNU stdc++ library

------------- Patch
--- update-alternatives.orig    Mon Feb 11 15:56:56 2002
+++ update-alternatives Mon Feb 11 15:57:04 2002
@@ -165,7 +165,7 @@
 if ($mode eq 'display') {
     if (!$dataread) {
         &pr("No alternatives for $name.");
-       exit 1;
+       exit 0;
     } else {
         &pr("$name - status is $manual.");
         if (defined($linkname= readlink("$altdir/$name"))) {
-----------------------------


---------------------------------------
Received: (at 133446-done) by bugs.debian.org; 12 Feb 2002 08:41:37 +0000
>From [EMAIL PROTECTED] Tue Feb 12 02:41:37 2002
Return-path: <[EMAIL PROTECTED]>
Received: from 12-238-101-237.client.attbi.com (yakko.doogie.org) 
[12.238.101.237] (uucp)
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 16aYVN-0003Rb-00; Tue, 12 Feb 2002 02:41:37 -0600
Received: from localhost [127.0.0.1] (uucp)
        by yakko.doogie.org with esmtp (Exim 3.34 1 (Debian))
        id 16aYTd-0001qb-00; Tue, 12 Feb 2002 02:39:49 -0600
Date: Tue, 12 Feb 2002 02:39:49 -0600 (CST)
From: Adam Heath <[EMAIL PROTECTED]>
X-X-Sender:  <[EMAIL PROTECTED]>
To: dvorak <[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]>
Subject: Re: Bug#133446: dpkg: update-alternatives exits with 1
In-Reply-To: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Delivered-To: [EMAIL PROTECTED]

On Mon, 11 Feb 2002, dvorak wrote:

This is not a bug.  The programs that use u-a should check it's return code.




Reply via email to