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

Aleksey Midenkov midenok at gmail.com
Fri Sep 9 22:26:20 BST 2022


Hi Axel,

On Fri, Sep 9, 2022 at 8:58 PM Axel Beckert <abe at debian.org> wrote:
>
> 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.

No, it was not always there. I've been using aptitude for 20 years or
so. When it started to be nagging it really freaked me out, but had no
time nor will to fix until now.

>
> 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.

But it returns to UI first and hence reloads the database, so you have
to wait in any case. Haven't you?

>
> > 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.

Pause means do nothing and wait for user interaction. The delay caused
by UI reload is not the "pause", is it?

>
> > 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.

Why it doesn't make sense? When error happens it pauses and shows the reply.

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

Return to UI without any interaction. Again, that is stupid: when you
run some lengthy installation you go away from display and when you
return back it asks for Enter then it forces you to wait until UI is
reloaded. That interaction didn't help me in any single case.

>
>                 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



-- 
@midenok



More information about the Aptitude-devel mailing list