[Aptitude-devel] Bug#282408: aptitude: should exit with error status (with --visual-preview)

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Wed Jan 20 20:01:53 UTC 2016


Control: tags -1 + moreinfo
Control: owner -1 !


Hi Matthias,

2004-11-21 22:09 Frans Pop:
>tags 282408 + d-i
>thanks
>
>On Sunday 21 November 2004 22:23, Frans Pop wrote:
>> If aptitude is called with --visual-preview and the installation fails
>> or is cancelled by the user after downloading packages, aptitude exits
>> with exit status 0 instead of with an error status.
>> I will clone this bug to aptitude for that.
>
>If aptitude is run with the --visual-preview option, it's exit status
>should reflect the status of the installation process.
>At the moment, it looks like the exit status is always 0.
>[...]


2011-11-30 00:27 Manuel A. Fernandez Montecelo:
>Hi,
>
>This is claimed to be fixed in the NEWS file (v0.4.10-1):
>
>http://anonscm.debian.org/gitweb/?p=aptitude/aptitude.git;a=blob;f=NEWS
>+ Minor bugs:
>* Return a failing exit code after jumping from the command-line
>  to visual mode if the last install run failed. (Closes: #282408)
>
>But it does not appear as "Closes: x" in the changelog for the same version:
>- 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.
>
>The code introduced in the commit who is supposed to have fixed it,
>it's still there today:
>http://anonscm.debian.org/hg/aptitude/head/rev/bcab12da26cf
>
>But as people show in merged bugs with this one, this command continues to fail:
>LANG=C /usr/bin/aptitude -V install inexistent; echo Exited: $?
>
>The visual preview seems to work fine though, or at least having some
>support for this even if not working 100% as people would desire.
>It's returning 255 when non-existing package or already installed, 0
>if something is confirmed and installed (v 0.6.4-1.2).


2016-01-14 20:53 matthias.hinkfoth2 at uni-rostock.de:
>Hi,
>
>this is apparently fixed in jessie (aptitude 0.6.11).
>aptitude returns 255 when quitting the preview.

Thanks for the input.

Just to make sure... do you know which package causes this, or is it
when exiting without installing anything?

Do you still have the session around, printing the status of the
command?


In my case, it works as expected (i.e., the bug is fixed) when not
installing packages or when the installation is successful, I haven't
tried when there are errors downloading or installing packages.


  # aptitude --visual-preview install netris; echo $?
  [no output because of quitting without installing]
  255
  
  # aptitude --visual-preview install netris; echo $?
  Performing actions...
  (Reading database ... 209831 files and directories currently installed.)
  Preparing to unpack .../netris_0.52-10_amd64.deb ...
  Unpacking netris (0.52-10) ...
  Processing triggers for man-db (2.7.5-1) ...
  Setting up netris (0.52-10) ...
  Press Return to continue.

  0


It would be great if somebody found a package with installation problems
or other could-be-problematic cases, to confirm that it's working fine
in that case as well.  But if not, I am inclined to close the bug as it
is, with the old version of the changelog which should have closed it.


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list