[Aptitude-devel] Bug#1019447: Bug#1019447: aptitude: Wrong "Press Return to continue" after succesful installation

Axel Beckert abe at debian.org
Fri Sep 9 18:58:16 BST 2022

Control: tag -1 + moreinfo

Hi Aleksey,

thanks for the bug report.

Aleksey Midenkov wrote:
> Since some version aptitude started to behave strangely: it asks user
> interaction after each successful installation.

I thought that the "Press Return to continue" was always there, just
the "'q' followed by Return to quit" has been added as a feature
somewhen 7 or 8 years ago. But now I'm no more sure if that "Press
Return to continue" was really there before.

What definitely has been added around that time (in 0.7.3 from October
2015) was this "Perfoming actions" line when switching from TUI to
installation output. (https://bugs.debian.org/323371)

> Press Return to continue, 'q' followed by Return to quit.
> That is strange because 'q' returns first into the UI and then
> quits.

This is correct and is intended.

> So no obvious reason to use 'q' from the above interaction because 'q'
> also works from the UI.

No, the reason is that you don't have to wait to reload the database
before being able to press "q" again.

> I guess the above pause was added to display
> the errors if any happened

There is no pause in that sense. The time the UI is displayed is AFAIK
needed to properly write down the current state of aptitude's package
list after the package installation.

> but the condition in the code for that was chosen wrongly.

The only thing I remember from discussions back then is that querying
for a "q" keypress without the following "Enter" press was much more
work than worth it and would have required a rewrite of the whole
input handling at that point in the workflow.

> I hope you will find the below patch well-suited for stopping
> bugging you with that useless pause.
> --- b/src/ui.cc 2020-05-21 06:32:38.000000000 +0300
> +++ b/src/ui.cc 2022-09-09 13:41:49.752101187 +0300
> @@ -1276,7 +1276,7 @@
>      pkgPackageManager::OrderResult rval = f(-1);
>      bool quit_after_dpkg_run = false;
> -    if(rval != pkgPackageManager::Incomplete)
> +    if(rval != pkgPackageManager::Completed)
>        {
>   cout << _("Press Return to continue, 'q' followed by Return to
> quit.") << endl;

Doesn't make sense to me. But maybe I also still haven't understood
what you're actually trying to achieve.

What exactly do you expect aptitude to do when the package
installation/update/removal run ended?

		Regards, Axel
 ,''`.  |  Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

More information about the Aptitude-devel mailing list