Debian Bug report logs - #233129
aptitude: Doesn't return error status on exit with errors

version graph

Package: aptitude; Maintainer for aptitude is Aptitude Development Team <aptitude-devel@lists.alioth.debian.org>; Source for aptitude is src:aptitude.

Reported by: David <dbree@duo-county.com>

Date: Tue, 17 Feb 2004 01:33:01 UTC

Severity: wishlist

Found in version 0.2.13-2

Fixed in version aptitude/0.4.10-1

Done: Daniel Burrows <dburrows@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Daniel Burrows <dburrows@debian.org>:
Bug#233129; Package aptitude. Full text and rfc822 format available.

Acknowledgement sent to David <dbree@duo-county.com>:
New Bug report received and forwarded. Copy sent to Daniel Burrows <dburrows@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: David <dbree@duo-county.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: aptitude: Doesn't return error status on exit with errors
Date: Mon, 16 Feb 2004 19:17:06 -0600
Package: aptitude
Version: 0.2.13-2
Severity: wishlist



-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux localhost 2.4.24-1 #1 Tue Feb 3 18:17:38 CST 2004 i586
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages aptitude depends on:
ii  apt [libapt-pkg-libc6.3-5 0.5.21         Advanced front-end for dpkg
ii  libc6                     2.3.2.ds1-11   GNU C Library: Shared libraries an
ii  libgcc1                   1:3.3.2-4      GCC support library
ii  libncurses5               5.3.20030719-5 Shared libraries for terminal hand
ii  libsigc++-1.2-5c102       1.2.5-1        Type-safe Signal Framework for C++
ii  libstdc++5                1:3.3.2-4      The GNU Standard C++ Library v3

-- no debconf information

It would be nice if aptitude returned an error status when an error is
encountered.  This would be useful for people who do unattended
updates/upgrades.  For example,  I am on dialup, and often attempt this
procedure late at night or other times when the telphone lines are not
in use, I wish to use a script on this order:

---------- sample script ---------
getonline() {
  <dial ISP>
}

while ! aptitude update; do
  getonline
done

while ! aptitude upgrade; do
  getonline
done
--------  end sample script ----------

This way, if the connection is lost, it would still redial and continue.
However, aptitude seems to return exit status 0 regardless.





Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Burrows <dburrows@debian.org>:
Bug#233129; Package aptitude. Full text and rfc822 format available.

Acknowledgement sent to Daniel Burrows <dnb114@psu.edu>:
Extra info received and forwarded to list. Copy sent to Daniel Burrows <dburrows@debian.org>. Full text and rfc822 format available.

Message #10 received at 233129@bugs.debian.org (full text, mbox):

From: Daniel Burrows <dnb114@psu.edu>
To: David <dbree@duo-county.com>, 233129@bugs.debian.org
Subject: Re: Bug#233129: aptitude: Doesn't return error status on exit with errors
Date: Mon, 16 Feb 2004 21:09:57 -0500
On Mon, Feb 16, 2004 at 07:17:06PM -0600, David <dbree@duo-county.com> was heard to say:
> It would be nice if aptitude returned an error status when an error is
> encountered.

  Which specific errors are causing problems?  If a fatal error occurs,
aptitude should exit with status -1 (ie, 255).

  Daniel

-- 
/-------------------- Daniel Burrows <dburrows@debian.org> -------------------\
|                      A conclusion is the place                              |
|                      where you got tired of thinking.                       |
\------- (if (not (understand-this)) (go-to http://www.schemers.org)) --------/



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Burrows <dburrows@debian.org>:
Bug#233129; Package aptitude. Full text and rfc822 format available.

Acknowledgement sent to David <dbree@duo-county.com>:
Extra info received and forwarded to list. Copy sent to Daniel Burrows <dburrows@debian.org>. Full text and rfc822 format available.

Message #15 received at 233129@bugs.debian.org (full text, mbox):

From: David <dbree@duo-county.com>
To: 233129@bugs.debian.org
Subject: Re: Bug#233129: aptitude: Doesn't return error status on exit with errors
Date: Tue, 17 Feb 2004 20:12:39 -0600
On Mon, Feb 16, 2004 at 09:09:57PM -0500, Daniel Burrows wrote:
> On Mon, Feb 16, 2004 at 07:17:06PM -0600, David <dbree@duo-county.com> was heard to say:
> > It would be nice if aptitude returned an error status when an error is
> > encountered.
> 
>   Which specific errors are causing problems?  If a fatal error occurs,
> aptitude should exit with status -1 (ie, 255).

I'm sorry.  I should have made it more clear.  I don't mean an error
from "aptitude" itself.  What I meant was that if, for example, if doing
"update", if the connection is lost, an error status is returned.

That way, when doing a scripted update-then-upgrade, you could keep it
redoing "update" till it was complete, then go on and "upgrade".  The
general idea is shown in the sample script of the original bugreport.

It seems that apt-get acts in this way.  I don't think there would be a
need for monitoring the connection itself - just give an error if any
connections failed - or perhaps just exiting with error if it exited
because of timeout.  Just missing one repository doesn't invalidate the
database.  There _is_ one case that _should_ be ignored.  I have one
repository where it just says something like "Package list ignored", but
doesn't seem to hurt anything.

Perhaps it's a matter if determining what's desired - in my case,
determining if the "update" is sufficient to proceed on to "upgrade",
and then determine when a complete "upgrade" has been accomplished.



Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Burrows <dburrows@debian.org>:
Bug#233129; Package aptitude. Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Daniel Burrows <dburrows@debian.org>. Full text and rfc822 format available.

Message #20 received at 233129@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: 233129@bugs.debian.org, control@bugs.debian.org
Cc: debian-user@lists.debian.org
Subject: Re: aptitude has poor exit status behaviour
Date: Thu, 13 Dec 2007 13:49:07 -0500
[Message part 1 (text/plain, inline)]
bts tag 233129 d-i
thanks

Daniel Burrows wrote:
>   I'm currently busy working on other parts of the program.  If you want
> this in a hurry your best bet is to either send a working patch to a bug
> report or (if such a patch already exists) to harass me via email until
> I apply it. :-)  Preferably all such harassment should be conducted via
> emails sent to bug reports so that it gets archived with the bug and
> filtered into my debbugs folder.

Please consider yourself harrassed. :-)

In d-i, we've implemented everything we need to get a nice progress bar
during the system's initial update of the Packages files from the
mirror. Except that apt doesn't send progress info for apt-get update
over the status-fd interface (#448908). Happily aptitude does send such
progress info over that interface, but since it doesn't propigate
download failures, lack of which would utterly break d-i, we can't
switch to using aptitude there.

(FWIW, #282408 is no longer on the d-i code path due to other changes,
and if #445035 were fixed, it might break tasksel in some situations
(though I'm sure I could deal with that).)

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#233129; Package aptitude. Full text and rfc822 format available.

Acknowledgement sent to Daniel Burrows <dburrows@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #25 received at 233129@bugs.debian.org (full text, mbox):

From: Daniel Burrows <dburrows@debian.org>
To: 233129@bugs.debian.org, debian-user@lists.debian.org
Subject: Re: aptitude has poor exit status behaviour
Date: Sat, 15 Dec 2007 09:42:58 -0800
On Thu, Dec 13, 2007 at 01:49:07PM -0500, Joey Hess <joeyh@debian.org> was heard to say:
> bts tag 233129 d-i

  Hm, that's an interesting one.  It looks like the apt fetcher claims
that the update succeeded even when some sources failed, so I have to
iterate the list of download items after the fact like apt-get does
and see if any of them failed.

  Daniel




Tags added: pending Request was from Daniel Burrows <dburrows@debian.org> to control@bugs.debian.org. (Sun, 16 Dec 2007 20:54:59 GMT) Full text and rfc822 format available.

Reply sent to Daniel Burrows <dburrows@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to David <dbree@duo-county.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #32 received at 233129-close@bugs.debian.org (full text, mbox):

From: Daniel Burrows <dburrows@debian.org>
To: 233129-close@bugs.debian.org
Subject: Bug#233129: fixed in aptitude 0.4.10-1
Date: Sun, 16 Dec 2007 21:47:03 +0000
Source: aptitude
Source-Version: 0.4.10-1

We believe that the bug you reported is fixed in the latest version of
aptitude, which is due to be installed in the Debian FTP archive:

aptitude-dbg_0.4.10-1_i386.deb
  to pool/main/a/aptitude/aptitude-dbg_0.4.10-1_i386.deb
aptitude-doc-cs_0.4.10-1_all.deb
  to pool/main/a/aptitude/aptitude-doc-cs_0.4.10-1_all.deb
aptitude-doc-en_0.4.10-1_all.deb
  to pool/main/a/aptitude/aptitude-doc-en_0.4.10-1_all.deb
aptitude-doc-fi_0.4.10-1_all.deb
  to pool/main/a/aptitude/aptitude-doc-fi_0.4.10-1_all.deb
aptitude-doc-fr_0.4.10-1_all.deb
  to pool/main/a/aptitude/aptitude-doc-fr_0.4.10-1_all.deb
aptitude-doc-ja_0.4.10-1_all.deb
  to pool/main/a/aptitude/aptitude-doc-ja_0.4.10-1_all.deb
aptitude_0.4.10-1.diff.gz
  to pool/main/a/aptitude/aptitude_0.4.10-1.diff.gz
aptitude_0.4.10-1.dsc
  to pool/main/a/aptitude/aptitude_0.4.10-1.dsc
aptitude_0.4.10-1_i386.deb
  to pool/main/a/aptitude/aptitude_0.4.10-1_i386.deb
aptitude_0.4.10.orig.tar.gz
  to pool/main/a/aptitude/aptitude_0.4.10.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 233129@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Burrows <dburrows@debian.org> (supplier of updated aptitude package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 16 Dec 2007 11:56:23 -0800
Source: aptitude
Binary: aptitude-doc-ja aptitude-doc-cs aptitude-dbg aptitude-doc-fr aptitude-doc-fi aptitude-doc-en aptitude
Architecture: source all i386
Version: 0.4.10-1
Distribution: unstable
Urgency: low
Maintainer: Daniel Burrows <dburrows@debian.org>
Changed-By: Daniel Burrows <dburrows@debian.org>
Description: 
 aptitude   - terminal-based package manager
 aptitude-dbg - Debug symbols for the aptitude package manager
 aptitude-doc-cs - Czech manual for aptitude, a terminal-based package manager
 aptitude-doc-en - English manual for aptitude, a terminal-based package manager
 aptitude-doc-fi - Finnish manual for aptitude, a terminal-based package manager
 aptitude-doc-fr - French manual for aptitude, a terminal-based package manager
 aptitude-doc-ja - Japanese manual for aptitude, a terminal-based package manager
Closes: 233129 450798 451311 451765 452201 452202 452541 452710 453362 454695 454700 455349 455865
Changes: 
 aptitude (0.4.10-1) unstable; urgency=low
 .
   * Add a reportbug script that includes the user's $TERM in the bug.
 .
   * Fix a typo in the aptitude description. (Closes: #452710)
 .
   * Add VCS fields to the control file.
 .
   * Build-Depend on the newest version of cwidget so we link against
     libcwidget1 instead of libcwidget0.
 .
   * New upstream release.
 .
     - Add an option --allow-untrusted to override trust warning.
       (Closes: #452201, #452541)
 .
     - Recommended packages are now hidden if quiet mode is enabled.
       (Closes: #452202)
 .
     - Fixed a segfault that would happen after updating the package lists
       or doing an install run.
         (Closes: #454695, #454700, #455349, #453362, #455865)
 .
     - If StepLimit is 0, abort dependency resolution cleanly instead of
       going into an infinite loop. (Closes: #451311)
 .
     - When visual mode is entered from the command-line (e.g., via
       --visual-preview), return a failing exit code if the last
       install run the user performs fails.
 .
     - Return a failing exit code from "aptitude update" if any
       download fails. (Closes: #233129)
 .
     - Checkboxes and radio buttons in the preferences tree will
       now toggle on both Space and Enter. (Closes: #451765)
 .
     - Command-line searches will now only print each result once.
       (Closes: #450798)
Files: 
 732f4baa22c6f3650cfc66b8a6a2344e 968 admin - aptitude_0.4.10-1.dsc
 afbaddb0aa8698746bd15b43eeefa8f0 5129549 admin - aptitude_0.4.10.orig.tar.gz
 c2b80a57cc3364ef085125f99f35cc92 33218 admin - aptitude_0.4.10-1.diff.gz
 cfa249f1746801f34a2b7dd2eef7197a 343434 doc optional aptitude-doc-cs_0.4.10-1_all.deb
 e9b7e6010d825c56ad509deb4cb4337b 336330 doc optional aptitude-doc-en_0.4.10-1_all.deb
 986cb29691ff4fb8624629837510ca02 261664 doc optional aptitude-doc-fi_0.4.10-1_all.deb
 86e5752179bb9101eddbd4ddb5cc4325 280980 doc optional aptitude-doc-fr_0.4.10-1_all.deb
 56d475f8495328a874fb8addd348b797 344564 doc optional aptitude-doc-ja_0.4.10-1_all.deb
 f2a1a3e804bbfd235ae202d3edcc3357 2447502 admin important aptitude_0.4.10-1_i386.deb
 f57e1538b52ed0cbbfa72e3a6549a82f 6505014 devel extra aptitude-dbg_0.4.10-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHZZvZch6xsM7kSXgRAuJzAKCPeyW1C+5K4obxjXecbCyZj9CIeQCgm9/h
WnXtZV8O1/oP4awDwbtJRXo=
=bOv+
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 13 Feb 2008 07:35:59 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 05:02:51 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.