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

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
E Shattow
Date:
2025-06-30 19:55:02 UTC
Severity:
normal
#1108505#5
Date:
2025-06-29 22:02:44 UTC
From:
To:
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.

#1108505#10
Date:
2025-06-30 10:49:55 UTC
From:
To:
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.

#1108505#15
Date:
2025-06-30 19:51:47 UTC
From:
To:
Hi,

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