[Aptitude-devel] Bug#807098: don't ask "Do you want to continue? [Y/n/?]" if there is nothing to do
Manuel A. Fernandez Montecelo
manuel.montezelo at gmail.com
Mon Dec 7 01:13:00 UTC 2015
2015-12-07 00:48 積丹尼 Dan Jacobson:
>
>OK I did aptitude --disable-columns full-upgrade but cat -e still shows
>
>22) xserver-xorg-video-sisusb $
>23) xserver-xorg-video-trident $
>24) xserver-xorg-video-vesa $
>25) xserver-xorg-video-vmware $
>$
>$
>$
>Accept this solution? [Y/n/q/?] n$
>The following actions will resolve these dependencies:$
>
>Indeed, extra blank lines too. Note I always use the CLI version and
>never the curses instance of aptitude.
I am not sure about why that command shows trailing blanks, perhaps it's
because it's using "package name fields" to help to render the screen
and by default they are 30-column wide, about the size that it shows
from 'x' to the end of the line.
But you can check that there's quite a difference between "search
aptitude" with and without --disable-columns.
Whether you use the curses interface or not, the CLI interface for
commands like "search" or "versions" uses the same routines for
formatting the output as curses, that's why the information is shown
"table-like".
The cases where it uses extra blank space it's because it has some
benefit: reusing implementation of other parts (less code size overall,
and hopefully less bugs), being able to use the same string scapes in
curses and command line, etc.
In general, and to be honest, I am not sure that it makes sense to spend
extra CPU cycles deciding whether include or to trim blanks after
formatting the columns, or even to spend engineering time solving that
problem. Even discussing all this takes some precious time...
>MAFM> I am not sure why you have the need to set this option to true,
>MAFM> but in general and by default aptitude already almost always asks.
>
>E.g., check with me with --download-only so I can be sure I'm ready for
>the size.
>
>MAFM> So for me Always-Prompt is a quite clear description, and has to do
>MAFM> something more than the default "almost always prompt", because that's
>MAFM> what aptitude already does anyway.
>
>MAFM> There's also the possibility to use -y/--assume-yes, which (as
>MAFM> documented in the man page) overrides
>MAFM> -P/Aptitude::CmdLine::Always-Prompt set to true if you are really sure
>MAFM> that you want to continue with an action no matter what, like the "purge
>MAFM> ~c" -> "aptitude -y purge ~c".
>
>-y: dangerous.
The man page says that it stills have some concept of what's dangerous,
although I don't know how well it works:
-y, --assume-yes
When a yes/no prompt would be presented, assume that the user
entered “yes”. In particular, suppresses the prompt that
appears when installing, upgrading, or removing
packages. Prompts for “dangerous” actions, such as removing
essential packages, will still be displayed. This option
overrides -P.
What I meant is that in general, if you find yourself performing an
action like "purge ~c" too often (which suggests that one actually
doesn't care anymore about any cruft left behind), and too often also
wants asks for confirmation to not do anything, it is a possible
alternative.
Cheers.
--
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
More information about the Aptitude-devel
mailing list