Bug#1108505: apt outputs logical-or vertical bar in recommended packages section

E Shattow <[email protected]>
Newsgroups gmane.linux.debian.apt.devel
Message-ID <CANV2PTOkzLtssn-gtsXoGwZFS+acGV8MBYtTgAmMTdGZ-P5BXQ__25824.6077968337$1751313325$gmane$org@mail.gmail.com>
Hi,

On Mon, Jun 30, 2025, 03:49 Julian Andres Klode <[email protected]> wrote:

> On Sun, Jun 29, 2025 at 03:02:44PM -0700, E Shattow wrote:
> > Package: apt
> > Version: 3.0.2
> > Severity: normal
> > X-Debbugs-Cc: [email protected]
> >
> > Dear Maintainer,
> >
> > `apt install git devscripts` in a clean trixie dist pbuilder environment
> and
> > see this:
> >
> > ...
> > Recommended packages:
> >   dctrl-tools                lintian          unzip
> > pristine-tar                libxstring-perl
> >   dput                       lzip             wget
>  less
> > libdata-dump-perl
> >   | dupload                  python3-apt      | curl
>  ssh-
> > client                  libhtml-form-perl
> >   libdistro-info-perl        python3-debian   debian-keyring
>  gnupg
> > libhttp-daemon-perl
> >   libgit-wrapper-perl        python3-magic    debian-tag2upload-keyring
> > libgpg-error-l10n           libmailtools-perl
> >   liblist-compare-perl       python3-unidiff  equivs
> > libhtml-format-perl         python3-argcomplete
> >   libstring-shellquote-perl  python3-xdg      libgitlab-api-v4-perl
> libio-
> > compress-brotli-perl  sopv-doc
> >   licensecheck               strace           libsoap-lite-perl
> > libnamespace-clean-perl
> > ...
> >
> > Are those logical-or vertical bar in output intentional? Looks like a
> parsing
> > bug to me, because of the column display the logical condition has lost
> context
> > and does not make sense to show the user. If you want to show these in a
> > meaningful way then after all the n-columns output of the simple
> non-logic-
> > encumbered keys, have a single-column listing one-per-line of the more
> > complicated keys.
>
> I can understand how say
>
>     A1 | A2 B C
>     D E F
>
> reads easier, but if you look at
>
>     A B C1
>     | C2 D
>
> vs.
>
>     A C1    D
>     B |C2
>
> or
>
>     A   |C2
>     B   D
>     C1
>
>
> It's not immediately clear one is better just because it wraps on
> lines instead of columns; the alternatives were never attached
> and always broken.
>
> In fact, I believe the columnar format here is actually more
> readable.
> --
>

I was suggesting

A B C
|D E F
G H |I

should instead be:

A B E
F G
C|D
H|I

where the columnized output is for simple keys and the one-per-line keys
follow with all the logic, not matching the alphanumeric sort anyways
because they are complex

...and if it is known at runtime to indicate which the likely result of the
complex key will be:

A B E
F G
C|D (D)
H|I (H)

or just hide the logic from the output but indicate when something is a
complex result:

A B (D)
E F G
(H)

and maybe it is not anything important to show the user so both hide logic
and don't trouble us with the details:

A B D
E F G
H

>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.