[Aptitude-devel] Bug#282408: aptitude: should exit with error status (with --visual-preview)
matthias.hinkfoth2 at uni-rostock.de
matthias.hinkfoth2 at uni-rostock.de
Wed Jan 20 21:32:27 UTC 2016
Hi Manuel,
OT: first of all, thanks for your work on aptitude.
> >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.
> >[...]
>
>
>
> Just to make sure... do you know which package causes this, or is it
> when exiting without installing anything?
I do not think this is related to any specific package.
> Do you still have the session around, printing the status of the
> command?
Please see below.
> 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.
After some testing I identified the following cases:
(1 and 2 as you reported)
1. installation canceled before downloading (pressing q in the preview)
> # aptitude --visual-preview install netris; echo $?
> [no output because of quitting without installing]
> 255
2. installation succesful
> # 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
3. trying to install without privileges:
# aptitude --visual-preview install rlwrap; echo $?
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
255
4. after download error, click Cancel
# sudo aptitude --visual-preview install rlwrap; echo $?
255
5. after download error, click Continue
# sudo aptitude --visual-preview install rlwrap; echo $?
Press Return to continue.
0
So, apparently, there still is a bug in case 5.
> 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.
A package that reliably fails to install can also be useful in other
test cases. :-)
Unfortunately I am unable to create such a package.
Regards,
Matthias
More information about the Aptitude-devel
mailing list