[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 00:30:02 UTC 2015


Hi,

2015-12-06 21:28 積丹尼 Dan Jacobson:
>Here it always asks too:

(missing part of the email, it seems)


>Maybe if I say 'n' then it won't do the actions.
>
>But it says it did them already just then.
>
>Twice too. (Different bug report.)
>
>Maybe in part because I have
># apt-config dump|grep Apti
>Aptitude "";
>Aptitude::CmdLine "";
>Aptitude::CmdLine::Always-Prompt "true";
>Aptitude::CmdLine::Show-Why "true";
>Aptitude::CmdLine::Show-Deps "true";
>Aptitude::CmdLine::Verbose "1";
>Aptitude::Purge-Unused "true";
>set.
>
># aptitude forbid-version perl perl-base perl-doc
>Marking version 5.22.1~rc3-2 of package perl as forbidden
>Marking version 5.22.1~rc3-2 of package perl-base as forbidden
>Marking version 5.22.1~rc3-2 of package perl-doc as forbidden
>Marking version 5.22.1~rc3-2 of package perl as forbidden
>Marking version 5.22.1~rc3-2 of package perl-base as forbidden
>Marking version 5.22.1~rc3-2 of package perl-doc as forbidden
>No packages will be installed, upgraded, or removed.
>0 packages upgraded, 0 newly installed, 0 to remove and 70 not upgraded.
>Need to get 0 B of archives. After unpacking 0 B will be used.
>Do you want to continue? [Y/n/?]
>
>Current status: 0 (+0) broken, 70 (+0) upgradable, 49753 (+0) new.
>#
>
>P.S., for all my bug reports, I have to use
>
>delete-trailing-whitespace is an interactive compiled Lisp function in
>`simple.el'.
>
>of emacs, because aptitude makes plenty!
>
>OK, I'll leave it in this time for you to find, "if you can"!
>
>But I know. "Who cares?"

I think that most of the whitespace happens because aptitude always
works with columns.  --disable-columns in the command line probably will
help you to get rid of most extra whitespace, but then it will not
"tabulate" the fields in the rows.

There's another bug report open about that, but whitespace in the
current "columns" mode is quite likely to remain as it is, because it's
a fundamental part of how aptitude output works.

(I'm not sure why this is relevant for the current bug report, though).


>MAFM> The problem that you mention in the example above is that aptitude
>MAFM> ignores what you ask with "-o" -- that seems to be the long-standing bug
>MAFM> #587671 and its duplicates, so merging.
>
>OK, but even when that is eventually fixed, I think we -P users are
>getting more than we bargained for,
>
>       -P, --prompt
>           Always display a prompt before downloading, installing or removing
>           packages, even when no actions other than those explicitly
>           requested will be performed.
>
>           This corresponds to the configuration option
>           Aptitude::CmdLine::Always-Prompt.
>
>
>I think it is even prompting when there is absolutely nothing left to
>do. I think that goes beyond what the man page says.
>
>I just want to be prompted in the cases the man page talks about!
>
>Sure, one could argue that Always means always. But the man page doesn't
>say that.
>
>Or maybe there needs to be a Almost Always option...

When Always-Prompt is set to false, installing a single package or
removing doesn't ask, but purging does (presumably it was done because
of the dangerous action that implies removing config files and so on).
Upgrading packages and other complex actions do ask for confirmation as
well.  I am not sure why you have the need to set this option to true,
but in general and by default aptitude already almost always asks.

So for me Always-Prompt is a quite clear description, and has to do
something more than the default "almost always prompt", because that's
what aptitude already does anyway.

There's also the possibility to use -y/--assume-yes, which (as
documented in the man page) overrides
-P/Aptitude::CmdLine::Always-Prompt set to true if you are really sure
that you want to continue with an action no matter what, like the "purge
~c" -> "aptitude -y purge ~c".

Either that or pressing a single Enter in the relatively rare occasions
when nothing needs to be done, doesn't look terribly inconvenient to me.


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



More information about the Aptitude-devel mailing list