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

Bug#133446: marked as done (dpkg: update-alternatives exits with 1)



Your message dated Tue, 12 Feb 2002 02:39:49 -0600 (CST)
with message-id <Pine.LNX.4.33.0202120239090.1258-100000@yakko.doogie.org>
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 dvorak@xs4all.nl Mon Feb 11 13:40:00 2002
Return-path: <dvorak@xs4all.nl>
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 (dvorak@xs4.xs4all.nl [194.109.6.45])
	by mxzilla4.xs4all.nl (8.12.0/8.12.0) with ESMTP id g1BJdxlX090971
	for <submit@bugs.debian.org>; Mon, 11 Feb 2002 20:39:59 +0100 (CET)
Received: from localhost (dvorak@localhost)
	by xs4.xs4all.nl (8.9.0/8.9.0) with ESMTP id UAA17433
	for <submit@bugs.debian.org>; Mon, 11 Feb 2002 20:39:59 +0100 (CET)
Date: Mon, 11 Feb 2002 20:39:58 +0100 (CET)
From: dvorak <dvorak@xs4all.nl>
To: <submit@bugs.debian.org>
Subject: dpkg: update-alternatives exits with 1
Message-ID: <Pine.BSI.4.33L2.0202112039030.3288-100000@xs4.xs4all.nl>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Delivered-To: submit@bugs.debian.org

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 doogie@debian.org Tue Feb 12 02:41:37 2002
Return-path: <doogie@debian.org>
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 <doogie@debian.org>
X-X-Sender:  <adam@yakko.doogie.org>
To: dvorak <dvorak@xs4all.nl>,  <133446-done@bugs.debian.org>
Subject: Re: Bug#133446: dpkg: update-alternatives exits with 1
In-Reply-To: <Pine.BSI.4.33L2.0202112039030.3288-100000@xs4.xs4all.nl>
Message-ID: <Pine.LNX.4.33.0202120239090.1258-100000@yakko.doogie.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Delivered-To: 133446-done@bugs.debian.org

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 to: