#808575 aptitude: Should use a pager to show package lists and choices in CLI mode

Package:
aptitude
Source:
aptitude
Description:
terminal-based package manager
Submitter:
積丹尼 Dan Jacobson
Date:
2015-12-23 03:45:04 UTC
Severity:
wishlist
#808575#5
Date:
2015-12-20 17:54:44 UTC
From:
To:
Got a problem here in command line mode.

      Upgrade the following packages:
7)      libapt-pkg-perl [0.1.29+b4 (now) -> 0.1.29+b5 (unstable)]
8)      libcairo-perl [1.106-1 (now) -> 1.106-1+b1 (unstable)]
9)      libcommon-sense-perl [3.74-1 (now) -> 3.74-1+b1 (unstable)]
...
38)     libyaml-syck-perl [1.29-1 (now) -> 1.29-1+b1 (unstable)]
39)     perl-tk [1:804.033-1 (now) -> 1:804.033-1+b1 (unstable)]



Accept this solution? [Y/n/q/?] **ALSO NOTE THE BIG 3 line gap above***

Well what about the first few? They have flown off my screen. So maybe
aptitude should honor PAGER?

The man page says

       PAGER
           If this environment variable is set, aptitude will use it to
           display changelogs when "aptitude changelog" is invoked. If not
           set, it defaults to more.

so maybe it should kick in optionally also in this case.

One notes one can still use less(1) $LESS with

       -F or --quit-if-one-screen
              Causes less to automatically exit if the entire file can be dis-
              played on the first screen.

#808575#10
Date:
2015-12-21 16:22:19 UTC
From:
To:
Hi,

2015-12-20 17:54 積丹尼 Dan Jacobson:

I think that a better solution for cases like this would be to use
--visual-preview.

The formatting of information in that case is a bit better than with
command line, and one can scroll up and down and fold subtrees, etc.

Honouring $PAGER would be nice in general, but I think that aptitude
already spawns too many processes to perform various tasks, and spawning
processes as root is always dangerous (and circumventing that to use
lower priviledges means quite a lot of work).


Cheers.

#808575#15
Date:
2015-12-21 16:39:54 UTC
From:
To:
MAFM> I think that a better solution for cases like this would be to use
MAFM> --visual-preview.

MAFM> The formatting of information in that case is a bit better than with
MAFM> command line, and one can scroll up and down and fold subtrees, etc.

I just tried it and there I am back in the scary curses interface that I
have avoided for the last 15? years.

MAFM> Honouring $PAGER would be nice in general, but I think that aptitude
MAFM> already spawns too many processes to perform various tasks, and spawning
MAFM> processes as root is always dangerous (and circumventing that to use
MAFM> lower priviledges means quite a lot of work).

All I want to do is pipe it to less -F. A lot less fancy than the curses stuff.

OK then make it like journactl(1). That would be fine.

#808575#20
Date:
2015-12-21 20:22:32 UTC
From:
To:
Hi Jidanni,

積丹尼 Dan Jacobson wrote:

In most terminals (at least Linux console and xterm), you can use
Shift-PageUp to scroll back. So this should be rather easy to achieve
in most cases.
even use a pager yet in this case, I assume this is a request to add
support for using a pager in such a situation, not that a specific
pager is hardcoded and $PAGER is ignored.

BTW: For viewing changelogs it _does_ honour $PAGER if set.

Yeah, I like that idea. Especially for dist-upgrades from oldstable to
stable this list may be longer than the terminal's scrollback buffer.

Yep. Another common less option for such cases is -X or --no-init

              Disables sending the termcap initialization and
	      deinitialization strings to the terminal. This is
	      sometimes desirable if the deinitialization string does
	      something unnecessary, like clearing the screen.

Nevertheless, aptitude uses Debian's sensible-pager by default and
falls back to "more", not "less". So adding "less -F" alike feature is
probably less trivial than it sounds.

		Regards, Axel

#808575#27
Date:
2015-12-21 23:57:16 UTC
From:
To:
AB> Nevertheless, aptitude uses Debian's sensible-pager by default and
AB> falls back to "more", not "less". So adding "less -F" alike feature is
AB> probably less trivial than it sounds.

Well all I know is CLI aptitude's lists go off the screen if too big, while
journalctl works fine.

#808575#32
Date:
2015-12-22 09:33:36 UTC
From:
To:
Hi,

積丹尼 Dan Jacobson wrote:

aptitude has nothing to do with journalctl. It's completely
independent of systemd.

		Regards, Axel

#808575#37
Date:
2015-12-23 03:43:29 UTC
From:
To:
AB> aptitude has nothing to do with journalctl. It's completely
AB> independent of systemd.

Yes, I'm just saying that journalctl's default functionality seems to work perfectly.